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

A100986 Smallest k such that concatenation of r*k and 1 is a prime for all r = 1 to n but not prime for r = n+1, or smallest k such that 10*r*k+1 is a prime for all r = 1 to n but not prime for r = n+1.

Original entry on oeis.org

1, 3, 21, 33, 1083, 2541, 822486, 51282, 1296060612
Offset: 1

Views

Author

Ray G. Opao, Jan 13 2005

Keywords

Comments

a(10) > 10^10. - Robert Price, Apr 02 2019

Examples

			a(4)=33 because 331, 661, 991 and 1321 (1321=10*4*33+1) are all prime, but 1651 (1651=10*5*33+1) is not prime. - _Robert Price_, Apr 02 2019
		

Crossrefs

Cf. A089323.

Programs

  • Mathematica
    Table[k = 1;
    While[! AllTrue[Table[10*r*k + 1, {r, 1, n}], PrimeQ] ||
    PrimeQ[10*(n + 1)*k + 1], k++]; k, {n, 1, 9}] (* Robert Price, Apr 02 2019 *)
  • PARI
    isok(k, n) = {for (r=1, n, if (! isprime(10*r*k+1), return (0));); !isprime(10*(n+1)*k+1);}
    a(n) = {my(k=1); while(! isok(k, n), k++); k;} \\ Michel Marcus, Apr 03 2019

Extensions

Corrected a(7) and added a(9) by Robert Price, Apr 02 2019

A090180 Primes p = prime(n) such that p + sum-of-digits(p) +- 1 = prime(n+1).

Original entry on oeis.org

2, 3, 23, 61, 131, 151, 331, 601, 661, 1013, 1033, 1103, 1123, 1231, 1237, 1259, 1307, 1321, 1811, 2131, 2621, 2861, 3301, 4021, 4159, 4373, 4463, 4733, 4759, 4801, 5059, 5101, 6151, 6229, 6397, 6737, 7079, 7369, 7433, 8191, 9109, 10181, 10691, 11119
Offset: 1

Views

Author

Enoch Haga, Jan 19 2004

Keywords

Examples

			a(2)=23. S(d)=5. 23+5=28. 28+1=29, the next prime in sequence. a(3)=61. S(d)=7. 61+7=68. 68-1=67, the next prime in sequence.
		

Crossrefs

Cf. A089323.

Programs

  • Mathematica
    ppQ[n_]:=Module[{sidn=Total[IntegerDigits[n[[1]]]]},n[[1]]+sidn+1 == n[[2]]||n[[1]]+sidn-1==n[[2]]]; Transpose[Select[Partition[Prime[ Range[1500]],2,1],ppQ]][[1]] (* Harvey P. Dale, Mar 19 2012 *)
Showing 1-2 of 2 results.