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-3 of 3 results.

A117461 Indices associated with primes in A117460. Both primes and their indices, after calculation of their respective digit sums, bear the relationship that both are prime and that sod(i) < sod(p) and sod(p) is the next prime after to sod(i), where sod is the sum of digits function.

Original entry on oeis.org

1, 2, 3, 14, 30, 43, 74, 142, 184, 214, 238, 241, 256, 287, 292, 308, 313, 346, 443, 449, 472, 544, 593, 601, 607, 623, 715, 737, 791, 814, 836, 854, 874, 881, 883, 913, 931, 973, 980, 995, 1088, 1156, 1237, 1307, 1316, 1343, 1381, 1396, 1462, 1565, 1622
Offset: 0

Views

Author

Enoch Haga, Mar 18 2006

Keywords

Comments

A117458-A117459 is the opposite case where sod(i) > sod(p).
A117460-A117461 is sod(i) < sod(p).
A033548-A033549 is sod(i) = sod(p). - G. L. Honaker, Jr.

Examples

			a(4) = 30. Its associated prime is 113 with sod = 5; sod(a(4)) = 3. Since 3 < 5 and 5 is the next prime after 3, a(4) belongs in the sequence.
		

Crossrefs

Cf. A007953 (sum of digits).

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
    				

Formula

SOD's are calculated for these indices; if they and their associated prime SOD's are both prime and bear the relation in the Brief description above, they are added to the sequence.

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

A117459 Indices associated with primes in A117458.

Original entry on oeis.org

49, 65, 269, 304, 344, 379, 469, 517, 553, 557, 647, 658, 683, 928, 1279, 1453, 1457, 1460, 1484, 1499, 1556, 1664, 1682, 1738, 1769, 1796, 1873, 1963, 1967, 2197, 2267, 2290, 2368, 2377, 2485, 2573, 2597, 2609, 2696, 2728, 2791, 2849, 2867, 2975, 2999
Offset: 0

Views

Author

Enoch Haga, Mar 18 2006

Keywords

Examples

			a(0) = 49 because 49 is the index of the prime 227. When the digits of each are summed, 49 = 4+9 = 13, the next prime after 11 -- formed by summing 2+2+7 = 11 in 227. Since 11 is the prime preceding 13, 49 belongs in the sequence.
		

Crossrefs

Formula

Index SOD's are computed in association with the primes in A117458
Showing 1-3 of 3 results.