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.

User: Carlos Rivera

Carlos Rivera's wiki page.

Carlos Rivera has authored 64 sequences. Here are the ten most recent ones:

A335363 The smallest prime and start of a run of exactly n primes that remain prime after each digit is replaced by its square.

Original entry on oeis.org

2, 19, 13, 131, 2111, 12815137, 103723971119
Offset: 1

Author

Carlos Rivera, Jun 10 2020

Keywords

Comments

a(7) > 4294967296.
Terms in A020449 are not terms of this sequence. - Chai Wah Wu, Jun 18 2020
a(8) > 10^13, if it exists. - Giovanni Resta, Jun 21 2020

Examples

			a(3)=13 because 13 -> 19 -> 181 are primes and 1641 is composite.
		

Crossrefs

Extensions

a(7) from Giovanni Resta, Jun 20 2020

A335314 Full autoinsertable of reversed multidigit primes are such primes that remain prime after all the possible internal autoinsertions of the reversed prime, one at a time.

Original entry on oeis.org

127, 131, 149, 163, 191, 347, 383, 457, 463, 479, 521, 569, 571, 613, 643, 653, 659, 739, 757, 797, 941, 40471, 49991, 79627, 81869, 83407, 5916623
Offset: 1

Author

Carlos Rivera, Jun 01 2020

Keywords

Comments

If the prime has K digits all the possible internal autoinsertions are K-1.
Supposed to have only a finite quantity of terms.
If it exists, the next term a(28) is > 2^32.

Examples

			Example: 127 generates 2 primes 1'721'27 and 12'721'7
Example: 5916623 generates 6 primes: 5'3266195'916623, 59'3266195'16623, 591'3266195'6623, 5916'3266195'623, 59166'3266195'23, 591662'3266195'3
		

Crossrefs

Cf. A335271.

Programs

  • PARI
    forprime(p=11, 10^8, my(v=digits(p), d=#v, f=1); for(i=1, d-1, my(t=concat(concat(v[1..i], Vecrev(v)), v[i+1..d]), q=fromdigits(t)); if(!isprime(q), f=0; break)); if(f, print1(p, ", "))) \\ Hugo Pfoertner, Jun 01 2020

A335329 Primes p of the form 4k+1 such that the sum up to p of the primes of the same form is a square.

Original entry on oeis.org

29, 61, 197, 11789, 7379689, 161409881, 14881142931617, 34041319775377
Offset: 1

Author

Carlos Rivera, Jun 01 2020

Keywords

Examples

			5+13+17+29 = 64 = 8^2.
5+...+161409881 = 354203842652416 = 18820304^2.
		

Crossrefs

Cf. A033998.

Programs

  • Mathematica
    s=0; Select[Prime@ Range[10^9], Mod[#,4]==1 && IntegerQ@ Sqrt[s+=#] &] (* Robert Price, Sep 10 2020 *)
    Module[{nn=74*10^5,k,a},k=Select[Prime[Range[nn]],Mod[#-1,4]==0&];a=Accumulate[ k];Select[ Thread[ {k,a}],IntegerQ[Sqrt[#[[2]]]]&]][[;;,1]] (* The program generates the first five terms of the sequence. *) (* Harvey P. Dale, Jul 19 2024 *)
  • PARI
    s=0;forprime(p=5,10^9,if(p%4==1,s+=p;if(issquare(s),print1(p,", ")))) \\ Hugo Pfoertner, Jun 02 2020
  • UBASIC
    10   'S1=sum of primes 4k+1, S1=sum of primes 4k+1
       20   'is S1 a square?
       30   S1=0:P=2:PM=2^32-10:K=1
       40   P=nxtprm(P):K=K+1:if P>PM then end
       50   if P@4=3 then goto 40
       60   S1=S1+P:SS1=isqrt(S1)
       70   if SS1*SS1=S1 then print K;P;S1;SS1;1
       80   goto 40
    

Extensions

a(7) and a(8) from Martin Ehrenstein using Kim Walisch's primesieve, Jan 09 2021

A335271 Full autoinsertable primes are such primes that remain prime after all the possible internal autoinsertions, one at a time.

Original entry on oeis.org

131, 173, 179, 191, 197, 283, 293, 367, 383, 401, 547, 587, 641, 701, 709, 757, 797, 827, 12197, 12289, 53881, 54779, 68927, 37898818253
Offset: 1

Author

Carlos Rivera, May 29 2020

Keywords

Comments

Supposed to have only a finite quantity of terms. If the prime has K digits all the possible internal autoinsertions are K-1.
If it exists, the next term is > 2^32.

Examples

			The prime 131 can be inserted into itself in two positions: 1'131'31, 13'131'1. Both are primes.
The prime 68927 can be inserted into itself in four positions: 6'68927'8927, 68'68927'927, 689'68927'27, 6892'68927'7. All the four are primes.
		

Crossrefs

Cf. A247098.

Programs

  • PARI
    forprime(p=11,10^8,my(v=digits(p),d=#v,f=1);for(i=1,d-1,my(t=concat(concat(v[1..i],v),v[i+1..d]),q=fromdigits(t));if(!isprime(q),f=0;break));if(f,print1(p,", "))) \\ Hugo Pfoertner, May 30 2020

Extensions

a(24) from Michael S. Branicky, Mar 27 2023

A334982 a(n) is the earliest start of a run of at least n consecutive primes that are also happy numbers.

Original entry on oeis.org

7, 19, 3067, 3313, 3313, 11550481, 11550481, 475389133, 1128863117, 1175267983, 19507818293, 176622893141, 176622893141, 495495126109, 4411512992681, 122634868247173, 122634868247173
Offset: 1

Author

Carlos Rivera, May 18 2020

Keywords

Crossrefs

Cf. A007770.

Extensions

a(11)-a(17) from Giovanni Resta, May 23 2020
a(16) corrected by Giovanni Resta, May 30 2020

A241525 a(n) is the smallest start of a run of exactly n consecutive primes such that the sum of the digits of each prime is composite.

Original entry on oeis.org

19, 17, 13, 521, 509, 503, 499, 491, 14153, 25793, 25771, 37663, 37657, 98729, 98717, 98713, 98711, 98689, 98669, 98663, 98641, 98639, 98627, 98621, 98597, 98573, 69794393, 69794383, 268684679, 268684651, 268684627, 329788829, 545497787, 545497769, 545497759, 545497753, 545497747, 545497741, 545497727, 545497723, 545497691, 545497681, 545497679, 545497637, 545497633, 545497609
Offset: 1

Author

Carlos Rivera, Apr 24 2014

Keywords

Comments

No more terms below 2^32

Examples

			a(3)=13 because the run of the 3 consecutive primes {13, 17, 19} is such that the sum of digits for each prime is {4, 8, 10}.
		

Crossrefs

Cf. A240598.

Programs

  • UBASIC
    10   P=1:KM=0:K=0:'puzzle 1290, Meller
       20   P=nxtprm(P):if P>2^32-20 then end
       30   gosub *SODP:if S<>prmdiv(S) then K=K+1:Q=P:goto 20
       40   if K>KM then print K, Q:KM=K
       50   K=0:goto 20
      200   *SODP:S=0:L=alen(P)
      210   for I=1 to L:D=val(mid(str(P), I+1, 1))
      220   S=S+D:next I
      230   return

A240598 The smallest first term of a sequence of exactly n consecutive prime numbers each of which has the property that its digit sum is prime.

Original entry on oeis.org

11, 7, 5, 3, 2, 2063, 3253, 3251, 14293, 2442191, 2442179, 2442173, 2442151, 2442133, 2442113, 466343539, 793234063, 10158613657, 5200298339, 281201652541, 3140590111859, 1523243332991, 1631014452929, 1008266115029
Offset: 1

Author

Carlos Rivera, Apr 08 2014

Keywords

Comments

There is no requirement on the order of primes that arise as the digit sums.
a(25) > 2*10^13. - Giovanni Resta, Apr 09 2014

Examples

			a(15) = 2442113 because each of the following fifteen consecutive primes {2442113, 24422133, 2442151, 2442173, 2442179, 2442191, 2442197, 2442199, 2442227, 2442263, 2442287, 2442289, 2442311, 2442353, 2442359} has a sum of digits producing another prime number and the smallest is 2442113.
a(17) = 793234063  because each of the following seventeen consecutive primes {793234063 793234067 793234111 793234139 793234153 793234171 793234177 793234193 793234207 793234243 793234261 793234289 793234333 793234357 793234391 793234427 793234441} has a sum of digits producing another prime number and the smallest is 793234063.
		

Crossrefs

Cf. A239790.

Programs

  • UBASIC
    10   P=1:KM=0:K=0:'puzzle 1290, Meller
       20   P=nxtprm(P):if P>2^32-20 then end
       30   gosub *SODP:if S=prmdiv(S) then K=K+1:Q=P:goto 20
       40   if K>KM then print K, Q:KM=K
       50   K=0:goto 20
      200   *SODP:S=0:L=alen(P)
      210   for I=1 to L:D=val(mid(str(P), I+1, 1))
      220   S=S+D:next I
      230   return

Extensions

a(18)-a(24) from Giovanni Resta, Apr 09 2014

A239790 The smallest multidigit prime of a sequence of n consecutive primes such that their digit sums are also a sequence of n consecutive primes.

Original entry on oeis.org

11, 41, 41, 191, 402131, 6340271501
Offset: 1

Author

Carlos Rivera, Mar 26 2014

Comments

a(7), if it exists, is larger than 2*10^14. - Giovanni Resta, Apr 03 2014
a(7) <= 101100010001001200110001. - Jens Kruse Andersen, Aug 28 2016
a(7) <= 1212030150560200001. - Oscar Volpatti, Aug 25 2025

Examples

			a(4)=191 because 191, 193, 197, 199 generates 11, 13, 17, 19.
a(5)=402131 because 402131, 402133, 402137, 402139, 402197 generates 11,13,17,19,23.
		

Crossrefs

Programs

  • PARI
    isok(p, n) = if ((p > 10) && isprime(p), my(v=vector(n)); v[1] = p; for (i=2, n, v[i] = nextprime(v[i-1]+1);); my(vs=vector(n, i, sumdigits(v[i]))); if (!isprime(vs[1]), return(0)); for (i=2, n, if (vs[i] != nextprime(vs[i-1]+1), return(0));); return(1););
    a(n) = my(k=1); while (!isok(k, n), k++); k; \\ Michel Marcus, Aug 28 2025
  • UBASIC
    10   P=7:KM=0:'puzzle 1290, Meller
       20   P=nxtprm(P):if P>2^32-20 then end
       30   gosub *K:if K<=KM then goto 20
       40   print K,P,Q1:KM=K:goto 20
      100   *K
      110   Z=P:gosub *SODZ
      120   if SODZ<>prmdiv(SODZ) then return
      130   K=1:Q=SODZ:Q1=Q
      140   Z=nxtprm(Z):gosub *SODZ
      150   if SODZ<>nxtprm(Q) then return
      160   K=K+1:Q=nxtprm(Q):goto 140
      200   *SODZ:SODZ=0:L=alen(Z)
      210   for I=1 to L:D=val(mid(str(Z),I+1,1))
      220   SODZ=SODZ+D:next I
      230   return
    

Extensions

a(6) from Giovanni Resta, Apr 03 2014

A235766 Smallest first term of a sequence of exactly n consecutive hoax numbers.

Original entry on oeis.org

22, 84, 12955, 291090, 9538589, 3541285143, 136063250955, 253282144742
Offset: 1

Author

Carlos Rivera, Jan 15 2014

Keywords

Comments

A hoax number is a composite number whose sum of digits is equal to the sum of the digits of its distinct prime factors.

Examples

			For n = 1, a(1) = 22 because 22 = 11*2 and the sum of the digits (SOD) in both sides is 4 but 23 is not composite.
For n = 2, a(2) = 84 because 84 = 2^2*3*7, SOD = 12; 85 = 5*17, SOD = 13 but 86 = 2*43 and SOD = 14 <> 9.
		

Crossrefs

Cf. A019506.

Extensions

a(6)-a(8) from Giovanni Resta, Jan 15 2014

A235680 The smallest first term of a sequence of n primes such that, after the first, each is equal to the previous prime plus the sum of all of its digits, plus the product of all of its nonzero digits.

Original entry on oeis.org

2, 191, 163, 151, 127, 1644997, 36778597, 935715673, 50682890749, 16390560362269, 63334172492839
Offset: 1

Author

Carlos Rivera, Jan 13 2014

Keywords

Comments

The following term produced in each sequence after the n-th is necessarily a composite integer.

Examples

			Example for n=8: a(8)=935715673 because after it the seven primes are 936311069, 936337351, 936490481, 936677149, 938391809, 938811763 and 939029537, with 936311069 = 935715673 + 9*3*5*7*1*5*6*7*3+(9+3+5+7+1+5+6+7+3) and so on...
		

Crossrefs

Extensions

a(9) from Giovanni Resta, Jan 13 2014
a(10)-a(11) from Giovanni Resta, Feb 22 2014