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

A344860 Numbers k such that A306920(k) contains the digit 0 and A306920(k+1) is not A306920(k) with a digit 0 removed.

Original entry on oeis.org

192, 238, 250, 293, 312, 346, 382, 432, 436, 446, 465, 510, 544, 554, 560, 571, 578, 583, 593, 607, 609, 631, 658, 671, 727, 729, 771, 780, 803, 812, 825, 844, 845, 848, 860, 866, 877, 883, 894, 917, 945, 962, 967, 974, 991, 1000, 1004, 1031, 1042, 1052, 1061
Offset: 1

Views

Author

Felix Fröhlich, May 31 2021

Keywords

Examples

			A306920(192) = 1021, containing the digit 0, A306920(193) = 1039 and 1039 cannot be obtained by removing a 0 digit from 1021, so 192 is a term of the sequence.
		

Crossrefs

Programs

  • PARI
    eva(n) = subst(Pol(n), x, 10)
    insert(n, len, pos) = my(d=digits(n), v=[], w=[]); for(y=1, pos, v=concat(v, d[y])); v=concat(v, vector(len)); for(z=pos+1, #d, v=concat(v, d[z])); eva(v)
    a306920(n) = forprime(p=10, , for(k=1, #digits(p)-1, my(zins=insert(p, n, k)); if(ispseudoprime(zins), return(p))))
    remove_zeros(n) = my(v=[], w=[], d=digits(n)); for(x=1, #d, if(d[x]==0, for(y=1, x-1, w=concat(w, d[y])); for(z=x+1, #d, w=concat(w, d[z]))); if(#w > 0, v=concat(v, [eva(w)])); w=[]); vecsort(v, , 8)
    is(n) = my(x=a306920(n), y=a306920(n+1), rz=remove_zeros(x)); if(#setintersect([0], vecsort(digits(x)))==0, return(0)); for(k=1, #rz, if(y==rz[k], return(0))); 1

A344637 a(n) is the smallest k > 0 such that the number that results from inserting a string of k zeros between all adjacent digits of prime(n) is also prime, or 0 if no such k exists.

Original entry on oeis.org

1, 1, 1, 1, 2, 4, 2, 1, 1, 2, 2, 1, 1, 1, 1, 1, 3, 1, 30, 1, 1
Offset: 5

Views

Author

Felix Fröhlich, May 25 2021

Keywords

Comments

Is a(26) = 0? Note that prime(26) = 101 and 101 is the largest known prime of the form 10^t + 1.
a(A000720(A004022(i))) = 0 for i > 1, i.e., a(n) = 0 if prime(n) is a repunit > 11.

Examples

			For n = 10: prime(10) = 29 and 200009 is the smallest prime obtained by inserting a string of zeros between all adjacent digits, so a(10) = 4.
		

Crossrefs

Programs

  • PARI
    eva(n) = subst(Pol(n), x, 10)
    insert_zeros(num, len) = my(d=digits(num), v=[]); for(k=1, #d-1, v=concat(v, concat([d[k]], vector(len)))); v=concat(v, d[#d]); eva(v)
    a(n) = my(p=prime(n)); for(k=1, oo, if(ispseudoprime(insert_zeros(p, k)), return(k)))

A306926 A(n, k) is the k-th prime p > 10 where a string of exactly n zeros can be inserted somewhere into the decimal expansion such that the resulting number is also prime; square array, read by antidiagonals, downwards.

Original entry on oeis.org

11, 13, 19, 17, 23, 17, 19, 31, 19, 13, 37, 41, 71, 23, 13, 41, 43, 73, 29, 23, 23, 53, 47, 79, 37, 73, 31, 17, 59, 53, 97, 59, 79, 43, 37, 17, 61, 59, 103, 71, 89, 107, 53, 19, 31, 67, 67, 149, 97, 179, 127, 59, 47, 43, 13, 71, 71, 151, 103, 223, 131, 61, 61
Offset: 1

Views

Author

Felix Fröhlich, Mar 16 2019

Keywords

Examples

			Array starts as follows:
   11,  13,  17,  19,  37,  41,  53,  59,  61,  67,  71,  79,  89,  97
   19,  23,  31,  41,  43,  47,  53,  59,  67,  71,  89,  97, 107, 109
   17,  19,  71,  73,  79,  97, 103, 149, 151, 157, 173, 181, 223, 229
   13,  23,  29,  37,  59,  71,  97, 103, 127, 137, 139, 157, 181, 199
   13,  23,  73,  79,  89, 179, 223, 233, 239, 241, 263, 269, 277, 281
   23,  31,  43, 107, 127, 131, 137, 139, 149, 151, 163, 173, 179, 181
   17,  37,  53,  59,  61,  67,  71, 107, 109, 151, 179, 193, 197, 211
   17,  19,  47,  61,  67,  71, 157, 181, 197, 227, 313, 347, 353, 367
   31,  43, 103, 113, 127, 137, 149, 157, 163, 173, 191, 241, 257, 277
   13,  79, 113, 139, 163, 191, 293, 313, 349, 397, 433, 439, 443, 449
   23,  79,  89, 137, 149, 151, 163, 181, 199, 229, 239, 241, 277, 311
   41,  79, 131, 157, 167, 197, 199, 227, 229, 233, 241, 347, 349, 359
  137, 167, 191, 197, 227, 277, 281, 313, 337, 353, 389, 421, 439, 449
Antidiagonals as a triangular array:
  11
  13, 19
  17, 23,  17
  19, 31,  19,  13
  37, 41,  71,  23,  13
  41, 43,  73,  29,  23,  23
  53, 47,  79,  37,  73,  31, 17
  59, 53,  97,  59,  79,  43, 37, 17
  61, 59, 103,  71,  89, 107, 53, 19,  31
  67, 67, 149,  97, 179, 127, 59, 47,  43, 13
  71, 71, 151, 103, 223, 131, 61, 61, 103, 79, 23
		

Crossrefs

Cf. A215417, A306920. Row 1 is A164329.

Programs

  • PARI
    insert(n, len, pos) = my(d=digits(n), v=[], w=[]); for(y=1, pos, v=concat(v, d[y])); v=concat(v, vector(len)); for(z=pos+1, #d, v=concat(v, d[z])); subst(Pol(v), x, 10)
    row(n, terms) = my(i=0); if(terms <= 0, print1(""), forprime(p=10, , for(k=1, #digits(p)-1, my(zins=insert(p, n, k)); if(ispseudoprime(zins), print1(p, ", "); i++; break)); if(i>=terms, print(""); break)))
    array(rows, cols) = for(x=1, rows-1, row(x, cols))
    array(12, 10) \\ Print initial 12 rows and 10 columns of array

A341899 a(n) is the smallest prime p > 10 such that when strings of n zeros are inserted between every pair of adjacent digits the result is also a prime.

Original entry on oeis.org

11, 19, 17, 13, 13, 23, 17, 17, 31, 13, 23, 41, 127, 61, 23, 13, 13, 67, 53, 89, 19, 227, 17, 29, 61, 151, 31, 37, 107, 53, 1741, 263, 167, 23, 31, 89, 61, 13, 43, 241, 53, 347, 1319, 19, 79, 419, 521, 19, 809, 677, 97, 97, 1223, 89, 13, 79, 67, 257, 17, 499
Offset: 1

Views

Author

Felix Fröhlich, Jun 04 2021

Keywords

Comments

First differs from A306920 at n = 13.
a(n) = A306920(n) if A306920(n) is < 100, i.e., is a two-digit number.

Examples

			For n = 13: Inserting 13 zeros between all adjacent digits of 127 gives 10000000000000200000000000007, which is prime. Since 127 is the smallest prime where inserting exactly 13 zeros between all adjacent digits results in a number that is also prime, a(13) = 127.
		

Crossrefs

Programs

  • PARI
    eva(n) = subst(Pol(n), x, 10)
    insert_zeros(num, len) = my(d=digits(num), v=[]); for(k=1, #d-1, v=concat(v, concat([d[k]], vector(len)))); v=concat(v, d[#d]); eva(v)
    a(n) = forprime(p=10, , if(ispseudoprime(insert_zeros(p, n)), return(p)))
Showing 1-4 of 4 results.