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

A072064 Least k>0 such that prime(n)+k*n is prime.

Original entry on oeis.org

1, 1, 2, 1, 4, 1, 2, 3, 2, 3, 2, 2, 2, 2, 4, 3, 4, 1, 6, 3, 4, 1, 10, 1, 4, 1, 2, 2, 2, 2, 4, 1, 4, 1, 6, 2, 6, 2, 6, 3, 24, 1, 2, 2, 6, 3, 8, 1, 6, 3, 8, 5, 2, 2, 2, 3, 2, 4, 6, 2, 16, 3, 2, 2, 2, 1, 4, 3, 6, 1, 10, 1, 4, 2, 6, 6, 16, 3, 8, 2, 4, 1, 6, 2, 10, 3, 4, 4, 18, 2, 6, 1, 2
Offset: 1

Views

Author

Reinhard Zumkeller, Jun 12 2002

Keywords

Examples

			n=3, prime(3)=5: 5+1*3=8 is not prime, but 5+2*3=11, therefore a(3)=2 and A072063(3)=11.
		

Crossrefs

Programs

  • Mathematica
    A072064[n_]:=Module[{p=Prime[n],k=1},While[!PrimeQ[p+k*n],k++];k];Array[A072064,100] (* Paolo Xausa, Nov 27 2023 *)
  • PARI
    a(n) = my(p=prime(n), k=1); while (!isprime(p+k*n), k++); k; \\ Michel Marcus, Nov 27 2023

A090471 Smallest prime not already used that is of the form prime(n)+kn for some k > 0.

Original entry on oeis.org

3, 5, 11, 19, 31, 37, 59, 43, 41, 79, 53, 61, 67, 71, 107, 101, 127, 97, 181, 131, 157, 167, 313, 113, 197, 179, 211, 163, 283, 173, 251, 227, 269, 241, 359, 223, 379, 239, 401, 293, 1163, 307, 277, 281, 467, 337, 587, 271, 521, 479, 641, 499, 347, 683, 367, 431
Offset: 1

Views

Author

Amarnath Murthy, Dec 02 2003

Keywords

Crossrefs

Cf. A072063.

Extensions

More terms from David Wasserman, Nov 08 2005

A359273 a(n) = least positive integer k such that (prime(n+k)-prime(n))/n is an integer.

Original entry on oeis.org

1, 1, 2, 1, 6, 2, 4, 6, 4, 7, 5, 6, 6, 6, 13, 10, 14, 4, 23, 12, 16, 4, 42, 6, 20, 5, 10, 10, 10, 10, 23, 6, 24, 6, 37, 12, 38, 14, 40, 22, 151, 6, 16, 16, 46, 22, 60, 10, 49, 25, 65, 43, 16, 18, 18, 27, 19, 38, 56, 19, 144, 30, 21, 21, 21, 10, 42, 32, 66
Offset: 1

Views

Author

Clark Kimberling, Jan 26 2023

Keywords

Examples

			a(5) = 6 because 5 divides 20, which is prime(5+6) - prime(5), and if 0 < k < 6, then 5 does not divide prime(5+k) - prime(5).
		

Crossrefs

Programs

  • Maple
    f:= proc(n) local p,k,q;
      p:= ithprime(n); q:= p;
      for k from 1 do
        q:= nextprime(q);
        if (q - p) mod n = 0 then return k fi;
      od
    end proc:
    map(f, [$1..100]); # Robert Israel, Jan 26 2023
  • Mathematica
    p[n_] := Prime[n];
    a[n_] := Select[Range[1000], IntegerQ[(p[n + #] - p[n])/n] &, 1]
    Flatten[Table[a[n], {n, 1, 130}]]
Showing 1-3 of 3 results.