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: Robin Garcia

Robin Garcia's wiki page.

Robin Garcia has authored 62 sequences. Here are the ten most recent ones:

A237454 Minimal representation (considered minimal in any canonical base b > 3) of n in a binary system with two distinct digits "1" and "3", not allowing zeros, where a digit d in position p (p = 1,2,3,...,n) represents the value d^p.

Original entry on oeis.org

1, 11, 3, 13, 113, 1113, 11113, 111113, 1111113, 31, 131, 33, 133, 1133, 11133, 111133, 1111133, 11111133, 111111133, 1111111133, 11111111133, 111111111133, 1111111111133, 11111111111133, 111111111111133, 1111111111111133, 11111111111111133, 111111111111111133, 311, 1311, 313, 1313, 11313, 111313, 1111313, 11111313, 331, 1331, 333, 1333, 11333
Offset: 1

Author

Robin Garcia, Feb 08 2014

Keywords

Comments

If digit "1" exists, the digits used in these numeral systems do not need to be consecutive.

Examples

			a(11) = 131 because 1^3 + 3^2 + 1^1 = 11.
		

Crossrefs

Cf. A235860.

A237662 Primes of the form 2^(k+l+m+1) - 2^(l+m+1) + 2^(m+1) + l - 2.

Original entry on oeis.org

3, 7, 11, 17, 23, 31, 37, 47, 59, 67, 73, 101, 127, 131, 191, 223, 229, 239, 251, 257, 383, 401, 457, 479, 503, 521, 577, 991, 997, 1019, 1031, 1153, 1601, 1993, 2039, 2053, 2069, 3583, 3593, 3851, 3967, 4079, 4091, 4099, 4111, 4133, 6143, 6211
Offset: 1

Author

Robin Garcia, Feb 11 2014

Keywords

Comments

These prime numbers can be written in the numeral system described in A235860 (perhaps not minimally) this way : 2..21..12..2 (or 1..12..2) k twos followed to the right by l ones, followed to the right by m twos.
k can be zero, with the arbitrary limitation, when k = 0, l <= m.
When k = m = 1 we get primes of the form 2^(l + 2) + l + 2.
It must be noted these primes include the Mersenne primes 3, 7, 31, 127, 8191, ... as well as the Fermat primes 3, 5, 17, 257, 65537, with the exception of 5. Mersenne primes can be represented by a one followed to the right by an even number of twos (if the number of twos is odd, the Mersenne number is divisible by 3) with the exception of 3 represented as 12. The Fermat numbers can be represented with three ones followed to the right by a Mersenne number of twos (2^t - 1 (t = 0, 1, 2, 3, 4, 5,...)) : 3 = 111 instead of shorter 12, 5 = 1112 instead of shorter 21, 17 = 111222, 257 = 1112222222, 65537 = 111222222222222222. The composite (divisible by 641) 2^32 + 1 : three ones followed to the right by thirty one twos. The second Fermat prime: 5, appears in this sequence if we let l > m and l <= 3 when k = 0.
By A235860 3, 7 , 17 and 31 can be represented as 12, 122, 111222, 12222 cases when k=0 (primes of the form 2^(m+1) + l - 2: 31 = 2^5 +1 -2). And 11, 73, 191 as 212, 211122, 2122222 (73 = 2^7 - 2^6 + 2^3 + 3 - 2).

Examples

			For k=l=m=1, 2^(k+l+m+1) - 2^(l+m+1) + 2^(m+1) + l - 2 = 2^4 - 2^3 + 2^2 + 1 - 2 = 16 - 8 + 4 + 1 - 2 = 11, so 11 is in the sequence.
		

Crossrefs

Programs

  • PARI
    n=10^5;e=89;a=1;if(a%2==0,a=a+1);b=ceil(log(n)/log(2));i=0;d=floor(b^(2.5));v=vector(d);for(n=0,b,for(p=a,b,if(n==0,x=p,x=b);forstep(m=a,x,2,c=2^(n+m+p+1)-2^(m+p+1)+2^(p+1)+m-2;if(isprime(c),i++;v[i]=c))));w=vecsort(v,,8);u=vector(#(w)-1);for(j=1,#(w)-1,u[j]=w[j+1]);if(e>#(u),e=#(u));s=vector(e);for(k=1,e,s[k]=u[k];print1(s[k], ", "))

A237816 k such that either 2^k + k - 3 or 2^k + k - 2 is prime.

Original entry on oeis.org

2, 4, 6, 10, 70, 82, 143, 150, 220, 413, 426, 816, 5497, 6649, 7429, 7728, 7891, 8248, 14567, 15522, 17935, 24942, 37415, 123773
Offset: 1

Author

Robin Garcia, Feb 13 2014

Keywords

Comments

Numbers of this form can be represented in the numeral system described in A235860 with k - 1 ones followed to the right by k - 1 twos or k ones followed to the right by k - 1 twos, like this: 1, 12, 112, 1122, 11122, 111222, 1111222, ... (1, 3, 4, 8, 9, 17, 18, ... in decimal) and are the least numbers that need one more digit to be represented than any of their predecessors.
The corresponding sequence of primes starts 3, 17, 67, 1031, 1180591620717411303491, ...

Crossrefs

Programs

  • Mathematica
     fQ[n_] := PrimeQ[2^n + n - If[ OddQ@ n, 2, 3]]; Select[ Range@ 30000, fQ]
  • PARI
    isok(n) = isprime(2^n + n - 3) || isprime(2^n + n - 2); \\ Michel Marcus, Feb 13 2014

Extensions

a(21)-a(22) from Robert G. Wilson v, Mar 03 2014
a(23) from Michael S. Branicky, May 01 2023
a(24) from Michael S. Branicky, Jul 30 2024

A236547 Numbers k such that (2^(2k + 1) - 2)/3 + k - 1 is prime.

Original entry on oeis.org

1, 2, 4, 10, 14, 28, 54, 62, 124, 592, 1088, 3154, 3920, 5564, 26510, 28674, 65124
Offset: 1

Author

Robin Garcia, Jan 28 2014

Keywords

Comments

These primes are represented in the numeral system described in A235860 with the digit "2" followed to the right with k-1 "12" strings.

Examples

			For n = 2, (2^5 - 2)/3 + 1 = 11, which is prime, so 2 is in the sequence.
		

Crossrefs

Cf. A235860.

Programs

  • PARI
    isok(n) = isprime((2^(2*n+1) -2)/3 + n-1); \\ Michel Marcus, Jan 28 2014

Extensions

a(1) inserted and a(15)-a(17) from Michael S. Branicky, Jul 29 2024

A235860 Minimal representation (considered minimal in any canonical base b >= 3) of n in a binary system using two distinct digits "1" and "2", not allowing zeros, where a digit d in position p (p = 1,2,3,...,n) represents the value d^p.

Original entry on oeis.org

1, 2, 12, 112, 21, 22, 122, 1122, 11122, 211, 212, 1212, 221, 222, 1222, 11222, 111222, 1111222, 2111, 2112, 12112, 2121, 2122, 12122, 112122, 2211, 2212, 12212, 2221, 2222, 12222, 112222, 1112222, 11112222, 111112222, 21111, 21112, 121112, 21121, 21122
Offset: 1

Author

Robin Garcia, Jan 16 2014

Keywords

Examples

			a(4) = 112 because 1^3 + 1^2 + 2^1 = 4.
36(10) in base 10 is represented as 21111 in this base because 2^5 + 1^4 + 1^3 + 1^2 + 1^1 = 36. It could also be represented as 1111112222. The minimal representation, considered in base 10, is chosen.
		

Crossrefs

Programs

  • Mathematica
    t = Range[1000]*0; Do[d=1+IntegerDigits[k, 2, n]; dd = FromDigits@d; v = Total[ Reverse[d]^ Range[n]]; If[0 < v <= 1000 && (t[[v]] == 0 || dd < t[[v]]), t[[v]] = dd], {n,17}, {k, 0, 2^n-1}]; t (* first 1000 terms, Giovanni Resta, Jan 16 2014 *)

A235167 Primes which are the sum of the first k consecutive composite numbers and such that the sums of the first k+1, k+2 and k+3 consecutive composites are also prime.

Original entry on oeis.org

1041973527756883, 1367813419317223, 2061752246097991, 2952443719006597, 3103011021307399, 3372968619197677, 10155190978946137, 34071498970634821, 43003872349213873, 45743947962658333, 58096932030228859, 60092475306807649, 115486262684753671
Offset: 1

Author

Robin Garcia, Jan 04 2014

Keywords

Examples

			a(1) = 1041973527756883 is the least prime, sum of the first consecutive 44208182 composites from 4 to 47042265, and such that the sum of the first 44208183, 44208184 and 44208185 composites are 1041973574799149, 1041973621841417, 1041973668883687, all prime.
		

Crossrefs

Programs

  • PARI
    i=0; b=0; for( a=2, 2*10^8, if( !isprime(a) , i=i+1; b=b+a; if(( isprime(b) &a%2==1& isprime(b+a+1)) &isprime(a+2)& isprime(b+2*a+4)&isprime( a+4)&isprime(b+3*a+9), print1(b,", "))))

Extensions

a(8)-a(13) from Donovan Johnson, Jan 06 2014

A235165 Primes which are sum of the first k consecutive composite numbers and such that the sum of the first consecutive k+1 composites and the sum of the first k+2 consecutive composites are also prime.

Original entry on oeis.org

997, 3889, 320375057, 423704707, 3431156159, 11650632419, 15909713927, 16906981181, 18170097067, 19703643541, 25534764667, 65405464363, 89483860811, 96873744973, 157599307213, 161983109531, 250812627893, 255555662521, 304165468751, 506667567067, 563313151277, 641930941499, 719915546257, 755132545199, 988899991367, 1002877111091, 1013997492671
Offset: 1

Author

Robin Garcia, Jan 04 2014

Keywords

Examples

			a(1) = 997 is prime and sum of the first 35 composites from 4 to 51.
And 997 + 52 = 1049 is prime and 1049 + 54 = 1103 is prime. But 1103 + 55 is even and thus not prime.
		

Crossrefs

Programs

  • Mathematica
    Select[Partition[Accumulate[Select[Range[20*10^6],CompositeQ]],3,1], AllTrue[ #,PrimeQ]&][[All,1]] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Sep 30 2017 *)
  • PARI
    i=0; b=0; for( a=2, 2*10^6, if( !isprime(a) , i=i+1; b=b+a; if(( isprime(b) & isprime(b+a+1) &isprime(a+2)& isprime(b+2*a+4))||(isprime(b)&isprime(a+1)&isprime(b+a+2)&isprime(a+3)&isprime(b+2*a+6)),print1(b,", "))))

A234847 Primes which are sum of the first k composite numbers and such that the sum of the first k+1 composites is also prime.

Original entry on oeis.org

997, 1049, 1709, 2137, 2953, 3889, 3989, 28643, 43451, 121937, 189239, 225077, 662843, 785303, 860143, 874351, 959209, 1026229, 1051151, 1271687, 1285507, 1772297, 2525801, 2834413, 2865199, 3456053, 3484361, 3538477, 4402241, 4762267, 8240539, 11557543, 15774301
Offset: 1

Author

Robin Garcia, Dec 31 2013

Keywords

Examples

			a(1)= 997 is prime and sum of the first 35 composites from 4 to 51. And the sum of the first 36 composites is 1049 and is also prime.
		

Crossrefs

Programs

  • Mathematica
    Transpose[Select[Partition[Accumulate[Select[Range[ 10000], CompositeQ]],2,1],AllTrue[ #,PrimeQ]&]][[1]] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Aug 12 2014 *)
  • PARI
    i=0; b=0; for( a=2, 6000, if( !isprime(a) ,i=i+1; b=b+a; if(( isprime(b) & isprime(b+a+1)& !isprime(a+1)) || (isprime(b) & isprime(b+a+2) & isprime(a+1)), print1(b,", "))))

A234511 a(n) is the smallest prime(i) such that (prime(i) - prime(j))/(i - j) = prime(n) with i > j.

Original entry on oeis.org

5, 11, 29, 97, 641, 1373, 2591, 4327, 8009, 19661, 36451, 134581, 38543, 172969, 212777, 268403, 1784171, 860239, 1562053, 6085103, 6958813, 3422971, 5103029, 14723567, 47973451, 38394329, 36271783, 75837497, 59160181, 47326919, 111660697, 369706811, 323627951
Offset: 1

Author

Robin Garcia, Dec 27 2013

Keywords

Comments

(i - j) = 2 for all the calculated terms, with the exception of a(1) where (i - j) = 1 and a(6) where (i - j) = 4.

Examples

			a(3) = 29 is the smallest prime (and 10th prime) such that there is a smaller 8th prime: 19 and (29 - 19) / (10 - 8) = 5 is the third prime.
		

Programs

  • Mathematica
    a[1]=5; a[n_] := Catch[Block[{r = Prime@n, i=2, j, p}, While[True, p = Prime[++i]; j = Mod[i, 2]; While[(j += 2) < i, If[p - Prime@j == r*(i-j), Throw@p]]]]] (* Giovanni Resta, Dec 28 2013 *)
  • PARI
    n=16;c=25000;for(b=2,c,forstep(a=b+2,c,2,d=prime(a)-prime(b);e=(a-b);if(d/e==d\e&d/e==prime(n),print([a,b,prime(a),prime(b),d,e,d/e])))) \\ finds a(16) and in general a(n).
    
  • PARI
    okp(n, p) = {i = primepi(p); forprime (q = 2, p-1, j = primepi(q); if ((p-q)/(i-j) == prime(n), return(1)););}
    a(n) = {p = 2; while (! okp(n, p), p = nextprime(p+1)); p;} \\ Michel Marcus, Dec 28 2013

Extensions

a(17)-a(25) from Giovanni Resta, Dec 28 2013
a(26)-a(33) from Donovan Johnson, Jan 01 2014

A227115 Powers but not squares which are sum of consecutive composites less than 10^7 ordered according to the proximity of the first composite of the sum to the first composite: 4.

Original entry on oeis.org

27, 10077696, 128, 32768, 8, 27, 1000, 1728, 5088448, 690807104, 27, 32, 512, 2048, 512, 6859, 4913, 243, 405224, 125, 3125, 2744, 98611128, 27000, 314432, 216, 1728, 1889568, 243, 2744, 512, 4913000
Offset: 1

Author

Robin Garcia, Jul 04 2013

Keywords

Comments

There are other informative data for each term of the sequence. They are (b,l,k) where b is the base to an odd power, l is the number of consecutive composites added, and k indicates the k-th composite c(k) from where the sums begin: (3,4,1), (6,4151,1), (2,10,2), (2,222,2), (2,1,3), (3,3,3), (10,30,7), (12,42,7), (172,2931,7), (884,35029,9), (3,1,17), (2,1,20), (2,13,20), (2,36,22), (2,12,23), (19,79,24), (17,59,31), (3,4,41), (74,772,42), (5,2,43), (5,37,43), (14,33,44), (462,13093,46), (30,162,47), (68,668,48), (6,3,50), (12,20,53), (18,1723,56), (3,3,57), (14,28,58), (2,6,59), (170,2827,60).

Examples

			We denote the n-th composite as c(n). Some of the odd powers are the sum of consecutive composites in several ways: 27 = 3^3 = c(1)+c(2)+c(3)+c(4) = c(3)+c(4)+c(5) = c(17) = 4 + 6 + 8 + 9 = 8 + 9 + 10. 243 = 3^5 = c(189) = c(90)+c(91) = c(57)+c(59)+c(59) = c(41)+c(42)+c(43)+c(44) = 121 + 122 = 80 + 81 + 82 = 58 + 60 + 62 + 63. 1000 = 10^3 is sum of 30 consecutive composites beginning with c(7) = 14. 1728 = 12^3 = Ramanujan taxicab minus 1 is sum of 42 consecutive composites beginning with c(7) = 14 and of 20 consecutive composites beginning with c(53) = 75.
		

Crossrefs

Programs

  • PARI
    n1=10^7;v=vector(n1);i=0;for(a=2,n1,if(isprime(a),next,i++;v[i]=a));for(b=1,60,k=0;for(j=b,i,k=k+v[j];if(ispower(k,,&n)&ispower(k)%2==1,print1([k,n,ispower(k),j-b+1,b]," "))))