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-5 of 5 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

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

A117462 The number of doubling steps of SOD(n) to exceed or equal n.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 3, 2, 2, 2, 2, 2, 2, 1, 1, 4, 3, 3, 3, 2, 2, 2, 2, 2, 2, 4, 3, 3, 3, 3, 3, 2, 2, 2, 2, 4, 4, 3, 3, 3, 3, 3, 3, 2, 2, 4, 4, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 3, 3, 3, 3, 3, 3, 3, 4
Offset: 1

Views

Author

Enoch Haga, Mar 18 2006

Keywords

Comments

"SOD" = "sum of digits".

Examples

			a(10) = 4. SOD(10)=1. 1 doubled is 2. Iterating: 2,4,8,16 -- 4 iterations of doubling 1 to exceed 10.
		

Crossrefs

Programs

  • BASIC
    10 'use of str,mid,len,val
    20 'number of doubled iterations required to equal or exceed sod(n)
    30 C=C+1
    40 D=str(C)
    50 E=len(D)
    60 for Q=2 to E
    70 A=mid(D,Q,1):G=val(A)
    80 I=I+G
    90 next Q
    100 print C;I;"-";
    110 K=I
    120 I=0
    130 for R=1 to C
    140 K=K+K:T=T+1
    150 if K>=C then print C;K;T:cancel for:stop:goto 170
    160 next R
    170 K=0:T=0
    180 goto 30
  • Maple
    A117462 := proc(n)
        local x;
        x := digsum(n) ;
        max(1,ceil(log[2](n/x))) ;
    end proc:
    seq(A117462(n),n=1..90) ; # R. J. Mathar, Sep 24 2018
  • Mathematica
    Array[Max[1, Ceiling@ Log2[#/Total@ IntegerDigits@ #]] &, 105] (* Michael De Vlieger, Sep 24 2018 *)

Formula

Take n, calculate SOD, and count doubling iterations (at least 1) to equal or exceed n.
a(n) = max(1, log_2(n/A007953(n))). - R. J. Mathar, Sep 24 2018

Extensions

Re-engineered definition from BASIC program, and corrected/clarified the terms. - R. J. Mathar, Sep 24 2018

A117477 Primes whose SOD and that of their indices are both prime and equal (indices may not be prime, but their SOD must be prime).

Original entry on oeis.org

131, 263, 1039, 1091, 1301, 1361, 1433, 2221, 2441, 2591, 2663, 2719, 2803, 3433, 3631, 4153, 4357, 4397, 5507, 5701, 5741, 5927, 6311, 6353, 6553, 6737, 6827, 6971, 7013, 7213, 7411, 7523, 7741, 8821, 9103, 11173, 11353, 11731, 11821, 12277, 12347
Offset: 1

Views

Author

Enoch Haga, Mar 19 2006

Keywords

Comments

"SOD" = "sum of digits".
This sequence is a subset of A033548, the difference being that this sequence requires prime SODs.

Examples

			a(3) = 1039, the 175th prime. Both the SOD of the index and the prime are prime and equal: 13 = 13.
		

Crossrefs

Programs

  • Mathematica
    sodQ[{n_,p_}]:=Module[{sodn=Total[IntegerDigits[n]],sodp=Total[IntegerDigits[p]]},AllTrue[ {sodn,sodp},PrimeQ] && sodn == sodp]; Select[With[{nn=1500},Table[{n,Prime[n]},{n,nn}]],sodQ][[;;,2]] (* Harvey P. Dale, Apr 20 2024 *)
  • UBASIC
    20 '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 then stop
    170 I=0:J=0
    180 goto 40

Formula

Find primes whose indices, when SODs are computed, are both prime and SOD(i) = SOD(p)

A117478 Indices of associated primes in A117477.

Original entry on oeis.org

32, 56, 175, 182, 212, 218, 227, 331, 362, 377, 386, 397, 409, 481, 508, 571, 595, 599, 728, 751, 755, 779, 821, 827, 847, 869, 878, 896, 902, 922, 940, 953, 982, 1099, 1129, 1354, 1372, 1408, 1417, 1468, 1475, 1507, 1550, 1585, 1648, 1693, 1747, 1772, 1774
Offset: 0

Views

Author

Enoch Haga, Mar 19 2006

Keywords

Comments

A subset of A033548-A033549 but here the SODs must be prime and equal

Examples

			a(3) = 182, with SOD 11. The associated prime is 1091, also SOD 11. SODs must be prime and equal.
		

Crossrefs

Programs

  • UBASIC
    20 '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 then stop
    170 I=0:J=0
    180 goto 40

Formula

Find prime indices with associated primes where both SODs are the same and prime.

Extensions

Typo in comment fixed by Franklin T. Adams-Watters, Dec 03 2009
Showing 1-5 of 5 results.