Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A113604
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
A113604 Define f(k) = k + sum of digits of n. a(n) is the first prime that results by applying f zero or more times to n, or 0 if no such prime exists. +0
1
2, 2, 3, 23, 5, 0, 7, 23, 0, 11, 11, 0, 13, 19, 0, 23, 17, 0, 19, 41, 0, 41, 23, 0, 37, 41, 0, 101, 29, 0, 31, 37, 0, 41, 43, 0, 37, 101, 0, 59, 41, 0, 43, 59, 0, 67, 47, 0, 101, 89, 0, 59, 53, 0, 89, 67, 0, 71, 59, 0, 61, 101, 0, 127, 89, 0, 67, 103, 0, 101, 71, 0, 73, 127, 0, 89 (list; graph; listen)
OFFSET

1,1

COMMENT

a(n) = n for n prime; a(n) = 0 for n > 3 and n == 0 (mod 3).

Conjecture: a(n) = 0 only if n == 0 (mod 3).

EXAMPLE

a(4) = 23 since f(4) = 4+4 = 8, f(8) = 8+8 = 16, f(16) = 16+1+6 = 23.

PROGRAM

(PARI) f(n) = local(k, s, d); k=n; s=0; while(k>0, d=divrem(k, 10); k=d[1]; s=s+d[2]); s+n {m=76; for(n=1, m, if(n>3&&n%3==0, print1(0, ", "), k=n; z=1000*n; while(k<z&&!isprime(k), k=f(k)); print1(if(k<z, k, 0), ", ")))}

CROSSREFS

Cf. A113605.

Sequence in context: A058157 A049132 A087768 this_sequence A084745 A036503 A109590

Adjacent sequences: A113601 A113602 A113603 this_sequence A113605 A113606 A113607

KEYWORD

base,easy,nonn

AUTHOR

Amarnath Murthy (amarnath_murthy(AT)yahoo.com), Nov 09 2005

EXTENSIONS

Edited and extended byKlaus Brockhaus (klaus-brockhaus(AT)t-online.de), Nov 10 2005

page 1

Search completed in 0.002 seconds

Lookup | Welcome | Find friends | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
More pages | Superseeker | Maintained by N. J. A. Sloane (njas@research.att.com)

Last modified November 25 20:09 EST 2009. Contains 167514 sequences.


AT&T Labs Research