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

A066540 The first of two consecutive primes with equal digital sums.

Original entry on oeis.org

523, 1069, 1259, 1759, 1913, 2503, 3803, 4159, 4373, 4423, 4463, 4603, 4703, 4733, 5059, 5209, 6229, 6529, 6619, 7159, 7433, 7459, 8191, 9109, 9749, 9949, 10691, 10753, 12619, 12763, 12923, 13763, 14033, 14107, 14303, 14369, 15859, 15973, 16529, 16673, 16903, 17239
Offset: 1

Views

Author

Jason Earls, Jan 06 2002

Keywords

Comments

The difference between the two primes of the pair is a multiple of 18. - Antonio Roldán, Mar 13 2012

Examples

			a(1) = 523 because both it and the next prime, 541, have a digital sum of 10.
		

Crossrefs

Subsequence of A117838. A069567 is a subsequence.

Programs

  • Mathematica
    Prime[ Select[Range[2000], Apply[ Plus, IntegerDigits[ Prime[ # ]]] == Apply[ Plus, IntegerDigits[ Prime[ # + 1]]] & ]]
    Prime[#]&/@(SequencePosition[Total[IntegerDigits[#]]&/@Prime[Range[2000]],{x_,x_}][[;;,1]]) (* Harvey P. Dale, Mar 27 2025 *)
  • PARI
    upto(limit)={my(d=2, L=List()); forprime(p=3, nextprime(limit+1), my(s=sumdigits(p)); if(s==d, listput(L, precprime(p-1))); d=s); Vec(L) } \\ Harry J. Smith, Feb 22 2010
    
  • PARI
    is_A066540(p)={my(n=nextprime(p+1)); (n-p)%18==0 & isprime(p) & A007953(p)==A007953(n)}  \\ M. F. Hasler, Oct 13 2012
    
  • Python
    from sympy import nextprime
    from itertools import islice
    def agen(): # generator of terms
        p, hp, q, hq = 2, 2, 3, 3
        while True:
            if hp == hq: yield p
            p, q = q, nextprime(q)
            hp, hq = hq, sum(map(int, str(q)))
    print(list(islice(agen(), 42))) # Michael S. Branicky, Feb 19 2024

A209396 Each entry is the first of three consecutive primes with equal digital sum.

Original entry on oeis.org

22193, 25373, 69539, 107509, 111373, 167917, 200807, 202291, 208591, 217253, 221873, 236573, 238573, 250073, 250307, 274591, 290539, 355573, 373073, 382373, 404273, 407083, 415391, 417383, 439009, 441193, 447907, 515173, 542837, 581873, 582083, 591673
Offset: 1

Views

Author

Antonio Roldán, Mar 13 2012

Keywords

Comments

Subsequence of A066540.
The differences between the three primes of the triple are multiples of 18.

Examples

			200807 is in the sequence because 200807, 200843, 200861 are consecutive primes and sum_of_digits(200807)= sum_of_digits(200843)= sum_of_digits(200861)=17
		

Crossrefs

Programs

  • Mathematica
    Select[Prime[Range[100000]], Total[IntegerDigits[#]] == Total[IntegerDigits[NextPrime[#, 1]]] == Total[IntegerDigits[NextPrime[#, 2]]] &] (* T. D. Noe, Mar 13 2012 *)
    Transpose[Select[Partition[Prime[Range[50000]],3,1],Differences[ Total/@ (IntegerDigits/@#)]=={0,0}&]][[1]] (* Harvey P. Dale, Jul 22 2016 *)

A227931 Smallest sets of 5 consecutive primes with equal digital sum. The initial prime is listed.

Original entry on oeis.org

5521819, 33014273, 36183593, 39874273, 47143739, 82934191, 83640653, 86225437, 89121073, 99551093, 104663773, 108616619, 109514719, 117611519, 131616409, 142348637, 151942291, 168056137, 168066791, 172096037, 196415237, 197604227, 203519819, 204983507
Offset: 1

Views

Author

Shyam Sunder Gupta, Oct 06 2013

Keywords

Examples

			5521819 is in the sequence because 5521819, 5521891, 5521927, 5521963 and 5521981 are consecutive primes and the sum of the digits of each = 31.
		

Crossrefs

Programs

  • Mathematica
    a = {}; m = 1; s = 1; Do[If[(y = Apply[Plus, IntegerDigits[x = Prime[n]]]) == s , m = m + 1; If[m == 6, AppendTo[a, Prime[n - 5]]], m = 1]; s = y, {n, 2, 100000000}];a
    Select[Partition[Prime[Range[11340000]],5,1],Length[Union[Total/@(IntegerDigits/@ #)]] == 1&][[All,1]] (* Harvey P. Dale, Apr 14 2022 *)

A230222 Smallest of four consecutive palindromic primes with equal digital sum.

Original entry on oeis.org

185595581, 317565713, 10832723801, 10875857801, 16831813861, 16832623861, 33396769333, 36215951263, 39003830093, 1069319139601, 1075309035701, 1181969691811, 1221739371221, 1269056509621, 1270668660721, 1292808082921, 1320348430231, 1385647465831
Offset: 1

Views

Author

Shyam Sunder Gupta, Oct 12 2013

Keywords

Examples

			185595581 is in the sequence because 185595581, 185676581, 185757581 and 185838581 are consecutive palindromic primes and the sum of the digits of each = 47.
		

Crossrefs

A227894 Smallest of five consecutive palindromic primes with equal digital sum.

Original entry on oeis.org

16831813861, 3026159516203, 303551090155303, 310917383719013, 324260616062423, 705345191543507, 906794646497609, 979863191368979, 10245455355454201, 10504462826440501, 10591066266019501, 10899190809199801, 10940832823804901, 11140913931904111
Offset: 1

Views

Author

Shyam Sunder Gupta, Oct 14 2013

Keywords

Examples

			16831813861 is in the sequence because 16831813861, 16832623861, 16833433861, 16834243861 and 16835053861 are consecutive palindromic primes and the sum of the digits of each = 46.
		

Crossrefs

A227933 Smallest sets of 6 consecutive primes with equal digital sum. The initial prime is listed.

Original entry on oeis.org

354963229, 448024483, 467739719, 475313609, 525523709, 771943583, 790277219, 881160173, 901572019, 925569683, 1051470419, 1085896727, 1110999817, 1285560163, 1331768783, 1455016319, 1472310383, 1519074619, 1628600381, 1815368519, 1914032047, 1990306673
Offset: 1

Views

Author

Shyam Sunder Gupta, Oct 06 2013

Keywords

Examples

			354963229 is in the sequence because 354963229, 354963283, 354963319, 354963337, 354963373 and 354963391 are consecutive primes and the sum of the digits of each = 43
		

Crossrefs

Programs

  • Mathematica
    a = {}; m = 1; s = 1; Do[If[(y = Apply[Plus, IntegerDigits[x = Prime[n]]]) == s , m = m + 1; If[m == 6, AppendTo[a, Prime[n - 5]]], m = 1]; s = y, {n, 2, 200000000}];a
Showing 1-6 of 6 results.