cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-2 of 2 results.

A117458 Primes and their indices such that when their respective SOD's are both prime, the SOD of the index is the nextprime of the prime SOD.

Original entry on oeis.org

227, 313, 1723, 2003, 2311, 2609, 3329, 3701, 4007, 4027, 4801, 4931, 5107, 7253, 10457, 12143, 12163, 12211, 12433, 12547, 13063, 14143, 14341, 14831, 15139, 15373, 16091, 17027, 17047, 19403, 20047, 20261, 21059, 21149, 22157, 23053, 23293, 23431, 24229, 24623
Offset: 1

Views

Author

Enoch Haga, Mar 18 2006

Keywords

Comments

"SOD" = "sum of digits".

Examples

			313 is a term, 65 is the index of the prime 313. The SOD(65) = 11. The SOD(313) = 7. 11 is the next prime after 7.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[25000],  PrimeQ[#] && PrimeQ[Plus @@ IntegerDigits[#]] &&
       NextPrime[Plus @@ IntegerDigits[#]] == Plus @@ IntegerDigits[PrimePi[#]] &] (* Tanya Khovanova, Mar 16 2021 *)

Formula

Individually sum the digits of both prime index and associated prime. If both sums are prime and the sum of the index is the next prime of the prime SOD, add to sequence.

Extensions

Offset changed to 1 by Alois P. Heinz, Mar 16 2021

A117460 Primes prime(i) such that their sum-of-index-digits A007953(i) and their sum-of-digits A007605(i) are consecutive primes.

Original entry on oeis.org

2, 3, 5, 43, 113, 191, 373, 821, 1097, 1307, 1493, 1523, 1619, 1873, 1907, 2029, 2081, 2339, 3109, 3169, 3347, 3923, 4339, 4421, 4463, 4603, 5417, 5581, 6067, 6263, 6427, 6607, 6791, 6841, 6863, 7127, 7307, 7673, 7723, 7877, 8731, 9341, 10079, 10723
Offset: 1

Views

Author

Enoch Haga, Mar 18 2006

Keywords

Comments

We select primes such that their sum-of-digits is some prime(j) and such that in addition the sum-of-digits of their index is prime(j-1).
Line 160 of the UBASIC program can be altered for <, >, or = relationships
Subset of A046704 - R. J. Mathar, Apr 17 2009

Examples

			"SOD" = "sum of digits": a(5) = 113, the prime whose index is 30. SOD(30) = 3 and SOD(113) = 5. Since 3 < 5 and 5 is nextprime to 3, adjoin 113 to the sequence.
		

Crossrefs

Programs

  • UBASIC
    10 'use of str,mid,len,val 20 'in SOD prime index and SOD prime 30 Y=1 40 Y=nxtprm(Y) 50 C=C+1:print C;Y;"-"; 60 D=str(C):Z=str(Y) 70 E=len(D):F=len(Z) 80 for Q=2 to E 90 A=mid(D,Q,1):G=val(A) 100 I=I+G:print I; 110 next Q 120 for R=2 to F 130 B=mid(Z,R,1):H=val(B) 140 J=J+H:print J; 150 next R 160 if I=prmdiv(I) and J=prmdiv(J) and I>J and I=nxtprm(J) then stop 170 I=0:J=0 180 goto 40

Formula

{A000040(i): A007605(i) = A000040(j) and A007953(i) = A000040(j+1) for some j}. - R. J. Mathar, Apr 17 2009

Extensions

Edited by R. J. Mathar, Apr 17 2009
Showing 1-2 of 2 results.