login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A261198 Start with n and repeat the map x -> x+sumdigits(x) until reaching a prime, which is a(n), or 0 if no prime is reached. 1
2, 23, 0, 23, 11, 0, 19, 23, 0, 11, 13, 0, 17, 19, 0, 23, 37, 0, 29, 41, 0, 41, 101, 0, 37, 41, 0, 101, 59, 0, 43, 37, 0, 41, 43, 0, 47, 101, 0, 59, 67, 0, 89, 59, 0, 67, 71, 0, 101, 89, 0, 59, 61, 0, 89, 67, 0, 71, 73, 0, 103, 101, 0, 127, 89, 0, 109, 103, 0, 101, 79, 0, 83, 127, 0, 89, 101, 0, 109, 109, 0, 103, 107, 0, 127, 101, 0, 109, 113, 0, 101, 103, 0, 107, 109, 0, 113, 127, 0, 101 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
Multiples of 3 never reach a prime because (multiple(3) + sumdigits of (multiple(3)) is always a multiple of 3.
LINKS
Maghraoui Abdelkader, Table of n, a(n) for n = 1..100
EXAMPLE
a(3)=0; a(6)=0; a(9)=0 as 3,6,9 are multiples of 3.
n=2; a0=2; a1=2+sumdigits(2)=4; a2=4+sumdigits(4)=8; a3=8+sumdigits(8)=16;
a4=16+sumdigits(16)=16+7=23; a4 is prime, so a(2)=23;
a(14)=14+(1+4=19); 19 is prime.
a(16)=16+(1+6)=23; 23 is prime.
PROG
(PARI)
verif(n)={if((n%3)==0, print1(0, ", "); return(); );
b=1; a=n;
while(b<10, a=a+sumdigits(a) ; if(isprime(a), print1(a, ", "); b=20))}
for(n=1, 100, verif(n); )
CROSSREFS
Sequence in context: A060601 A053952 A343263 * A052077 A124604 A329336
KEYWORD
nonn,base
AUTHOR
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 19 12:14 EDT 2024. Contains 371792 sequences. (Running on oeis4.)