The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
A252005 a(1)=2; for n>1, a(n) is the least prime > a(n-1) such that sum of digits of a(n-1) and a(n) is prime. 2

%I #16 Sep 30 2018 17:46:11

%S 2,3,11,23,53,83,101,113,149,179,239,269,293,311,347,359,383,401,419,

%T 449,479,557,563,593,617,647,653,683,743,773,839,863,929,953,983,1019,

%U 1061,1091,1151,1163,1223,1301,1319,1367,1373,1439,1481,1493,1553,1583,1607,1619,1667,1697,1733,1787,1823

%N a(1)=2; for n>1, a(n) is the least prime > a(n-1) such that sum of digits of a(n-1) and a(n) is prime.

%H Zak Seidov, <a href="/A252005/b252005.txt">Table of n, a(n) for n = 1..1000</a>

%e a(2)=3, next primes are 5, 7, 11 and only 3+1+1 is prime, hence

%e a(3)=11, next primes are 13, 17, 19, 23 and only 1+1+2+3 is prime, hence a(4)=23, etc.

%t lp[n_]:=Module[{p=NextPrime[n],tid=Total[IntegerDigits[n]]}, While[ CompositeQ[ Total[ IntegerDigits[p]]+tid],p=NextPrime[p]];p]; NestList[ lp,2,60] (* Requires Mathematica version 10 or later *) (* _Harvey P. Dale_, Sep 30 2018 *)

%Y Cf. A007953, A252006.

%K base,nonn

%O 1,1

%A _Zak Seidov_, Dec 12 2014

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 May 12 19:25 EDT 2024. Contains 372494 sequences. (Running on oeis4.)