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.

Previous Showing 31-40 of 52 results. Next

A047982 a(n) = A047980(2n+1).

Original entry on oeis.org

1, 24, 38, 184, 368, 668, 634, 512, 1028, 1468, 3382, 4106, 10012, 7628, 11282, 38032, 53630, 37274, 63334, 34108, 102296, 119074, 109474, 117206, 60664, 410942, 204614, 127942, 125618, 595358, 517882, 304702, 352022, 1549498, 651034, 506732, 5573116, 1379216, 1763144
Offset: 0

Views

Author

Keywords

Examples

			a(2)=38 because A034693(38) = 2*2+1 = 5 is the first 5; 5*38+1 = 191 is the first prime. The successive progressions in which the first prime appears at position 5 are as follows: 38k+1, 62k+1, 164k+1. 2nd example: a(20)=102296 because. The first 41 appears in A034693 at this index. Also 102296*(2*20+1)+1 = 102296*41+1 = 4194137 is the first prime in {102296k+1}. The next progression with this position of prime emergence is 109946k+1 (the corresponding prime is 4507787).
		

Crossrefs

Formula

a(n) = min {d}: A034693(a(n)) is an odd number k such that in a(n)*k+1 progression the first prime occurs at k=2n+1 position.

Extensions

More terms from Michel Marcus, Sep 01 2019

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

A087376 Leading diagonal of A087377.

Original entry on oeis.org

1, 2, 6, 7, 14, 7, 30, 24, 30, 19, 60, 23, 72, 33, 46, 48, 90, 34, 124, 51, 82, 64, 144, 67, 148, 78, 118, 87, 240, 58, 232, 113, 150, 114, 200, 88, 288, 165, 202, 138, 332, 91, 352, 167, 202, 163, 384, 136, 372, 143, 258, 195, 500, 142, 360, 207, 318, 226, 552, 137
Offset: 1

Views

Author

Amarnath Murthy, Sep 09 2003

Keywords

Crossrefs

Programs

  • Mathematica
    f = Function[n, k = cnt = 0; While[cnt < n, k++; If[PrimeQ[k n + 1], cnt++]]; k]; Table[f[n], {n, 60}] (* Ivan Neretin, May 22 2015 *)

Formula

Conjecture: a(n) < n^2.

Extensions

More terms from David Wasserman, May 24 2005

A087377 Triangle read by rows: n-th row contains n smallest numbers k (say) such that nk+1 is a prime.

Original entry on oeis.org

1, 1, 2, 2, 4, 6, 1, 3, 4, 7, 2, 6, 8, 12, 14, 1, 2, 3, 5, 6, 7, 4, 6, 10, 16, 18, 28, 30, 2, 5, 9, 11, 12, 14, 17, 24, 2, 4, 8, 12, 14, 18, 20, 22, 30, 1, 3, 4, 6, 7, 10, 13, 15, 18, 19, 2, 6, 8, 18, 30, 32, 36, 38, 42, 56, 60, 1, 3, 5, 6, 8, 9, 13, 15, 16, 19, 20, 23, 4, 6, 10, 12, 24, 34
Offset: 1

Views

Author

Amarnath Murthy, Sep 09 2003

Keywords

Comments

From Robert Israel, May 22 2015: (Start)
If n is odd, all elements in row n are even.
By Dirichlet's theorem, every positive integer occurs infinitely often in the sequence. (End)

Examples

			1
1 2
2 4 6
1 3 4 7
2 6 8 12 14
1 2 3 5 6 7
4 6 10 16 18 28 30
		

Crossrefs

The first column is given by A034693.

Programs

  • Maple
    F:= proc(n) local res,count,k;
       res:= NULL:
       count:= 0:
       for k from 1 while count < n do
          if isprime(n*k+1) then
            res:= res,k;
            count:= count+1
          fi
       od;
       res
    end proc:
    seq(F(n),n=1..20); # Robert Israel, May 22 2015
  • Mathematica
    a = {}; Do[k = 0; ar = {}; While[Length[ar] < n, k++; If[PrimeQ[k n + 1], AppendTo[ar, k]]]; a = Join[a, ar], {n, 13}]; a (* Ivan Neretin, May 22 2015 *)
  • PARI
    tabl(nn) = {for (n = 1, nn, j = 0; for (k = 1, n, j++; while (!isprime(n*j+1), j++); print1(j, ", ");); print(););} \\ Michel Marcus, May 23 2015

Extensions

More terms from Sam Alexander, Feb 27 2004

A087952 Smallest prime == 1 (mod n) and > n^2.

Original entry on oeis.org

2, 5, 13, 17, 31, 37, 71, 73, 109, 101, 199, 157, 313, 197, 241, 257, 307, 379, 419, 401, 463, 617, 599, 577, 701, 677, 757, 953, 929, 991, 1117, 1153, 1123, 1259, 1471, 1297, 1481, 1483, 1873, 1601, 1723, 1933, 1979, 2069, 2161, 2347, 2351, 2593, 2549, 2551
Offset: 1

Views

Author

Ray Chandler, Sep 16 2003

Keywords

Comments

Primes arising in A087554.
Since A014085(n) ~ n/log(n) one may conjecture that a(n) < 2*n^2 for all n > 1. Numerically we find a(n) = n^2*(1 + O(1/sqrt(n))). - M. F. Hasler, Feb 27 2020

Examples

			For n=1, a(1) = 2, because 2 == 1 mod 1 and 2 > 1^2.
For n=2, a(2) = 5, because 5 == 1 mod 2 and 5 > 2^2.
		

Crossrefs

Cf. A014085 (number of primes between n^2 and (n+1)^2).

Programs

  • Mathematica
    spr[n_]:=Module[{p=NextPrime[n^2]},While[Mod[p,n]!=1,p=NextPrime[p]];p]; Join[ {2},Array[spr,50,2]] (* Harvey P. Dale, Jun 21 2021 *)
  • PARI
    apply( {A087952(n)=forprime(p=n^2+1,,(p-1)%n||return(p))}, [1..66]) \\ M. F. Hasler, Feb 27 2020

Extensions

Examples added by N. J. A. Sloane, Jun 21 2021

A231818 Least positive k such that k*n^n - 1 is a prime, or 0 if no such k exists.

Original entry on oeis.org

3, 1, 2, 5, 6, 3, 6, 39, 18, 6, 12, 19, 8, 23, 10, 3, 76, 13, 90, 26, 52, 45, 124, 12, 60, 27, 10, 99, 126, 11, 50, 27, 28, 59, 6, 80, 122, 71, 110, 21, 72, 111, 590, 147, 178, 84, 238, 12, 138, 236, 10, 53, 6, 60, 98, 72, 620, 30, 166, 5, 98, 18, 22, 384, 126
Offset: 1

Views

Author

Alex Ratushnyak, Nov 13 2013

Keywords

Crossrefs

Cf. A035092 (least k such that k*(n^2)+1 is a prime).
Cf. A175763 (least k such that k*(n^n)+1 is a prime).
Cf. A035093 (least k such that k*n!+1 is a prime).
Cf. A193807 (least k such that n*(k^2)+1 is a prime).
Cf. A231119 (least k such that n*(k^k)+1 is a prime).
Cf. A057217 (least k such that n*k!+1 is a prime).
Cf. A034693 (least k such that n*k +1 is a prime).
Cf. A231819 (least k such that k*(n^2)-1 is a prime).
Cf. A083663 (least k such that k*n!-1 is a prime).
Cf. A231734 (least k such that n*(k^2)-1 is a prime).
Cf. A231735 (least k such that n*(k^k)-1 is a prime).
Cf. A231820 (least k such that n*k!-1 is a prime).
Cf. A053989 (least k such that n*k -1 is a prime).

Programs

  • Mathematica
    Table[k = 1; While[! PrimeQ[k*n^n - 1], k++]; k, {n, 65}] (* T. D. Noe, Nov 15 2013 *)

A238847 Smallest k such that k*n^3 + 1 is prime.

Original entry on oeis.org

1, 2, 4, 3, 2, 2, 4, 15, 2, 3, 2, 2, 6, 3, 10, 3, 26, 3, 4, 2, 2, 15, 26, 7, 4, 2, 2, 6, 2, 2, 10, 2, 20, 4, 2, 3, 4, 3, 4, 6, 6, 4, 10, 2, 14, 16, 12, 3, 4, 9, 10, 6, 24, 3, 4, 6, 2, 3, 2, 2, 18, 6, 6, 3, 14, 5, 16, 9, 18, 3, 2, 2, 4, 3, 10, 6
Offset: 1

Views

Author

Derek Orr, Mar 06 2014

Keywords

Examples

			a(1) = 1 because in order for k*(1^3)+1 to be the smallest prime, k must be 1 (1*(1^3)+1 = 2).
a(2) = 2 because in order for k*(2^3)+1 to be the smallest prime, k must be 2 (2*(2^3)+1 = 17).
a(3) = 4 because in order for k*(3^3)+1 to be the smallest prime, k must be 4 (4*(3^3)+1 = 109).
		

Crossrefs

Programs

  • Mathematica
    sk[n_]:=Module[{k=1,n3=n^3},While[!PrimeQ[k*n3+1],k++];k]; Array[sk, 80] (* Harvey P. Dale, Aug 27 2014 *)
    Table[SelectFirst[Range[10^2], PrimeQ[# n^3 + 1] &], {n, 76}] (* Michael De Vlieger, Mar 27 2016, Version 10 *)
  • PARI
    a(n) = {k=1; while(!isprime(k*n^3+1), k++); k;} \\ Altug Alkan, Mar 26 2016
  • Python
    import sympy
    from sympy import isprime
    def f(n):
      for k in range(1,10**3):
        if isprime(k*(n**3)+1):
          return k
    n = 1
    while n < 10**3:
      print(f(n))
      n += 1
    

A362376 a(n) is the least k such that Fibonacci(n)*Fibonacci(k) + 1 is a prime, and -1 if no such k exists.

Original entry on oeis.org

1, 1, 1, 3, 3, 3, 9, 3, 4, 9, 3, 4, 3, 27, 4, 24, 24, 4, 3, 6, 3, 3, 444, 3, 12, 9, 3, 63, 6, 8, 36, 6, 36, 12, 12, 4, 21, 60, 4, 3, 24, 73, 51, 3, 11, 51, 12, 4, 504, 12, 3, 33, 21, 6, 9, 6, 4, 384, 21, 7, 54, 3, 4, 51, 24, 63, 30, 24, 11, 45, 72, 6, 39, 9, 22, 42, 12, 16, 60, 30
Offset: 1

Views

Author

Jack Braxton, Apr 17 2023

Keywords

Comments

The frequencies seem interesting. In the early terms, 5 appears notably rarely, i.e., not until at a(240), whereas several other numbers appear notably frequently, e.g., 24 appears 13 times before a(240). - Peter Munn, May 03 2023

Examples

			For n=4, Fibonacci(4)=3 and 3*Fibonacci(k)+1 is not prime until k reaches 3, so a(4)=3.
		

Crossrefs

Programs

  • Mathematica
    Table[m = Fibonacci[n]; k = 1; While[! PrimeQ[m*Fibonacci[k] + 1], k++]; k, {n, 120}] (* Michael De Vlieger, May 03 2023 *)
  • PARI
    a(n) = my(F=fibonacci(n), k=1); while (!ispseudoprime(F*fibonacci(k) + 1), k++); k; \\ Michel Marcus, Apr 18 2023
    
  • Python
    from itertools import count
    from sympy import fibonacci, isprime
    def A362376(n):
        a = b = fibonacci(n)
        for k in count(1):
            if isprime(a+1):
                return k
            a, b = b, a+b # Chai Wah Wu, May 03 2023

Formula

a(n) = A363533(A000045(n)). - Pontus von Brömssen, Jun 20 2023

Extensions

More terms from Michel Marcus, Apr 18 2023

A034846 a(n) = P(n,6) = 1+6*K(n,6)=1+6*A034783(n). P(n,6) are special primes of 6k+1. The relevant values of k are given by A034783.

Original entry on oeis.org

103, 283, 331, 367, 463, 547, 607, 619, 643, 709, 727, 739, 823, 859, 883, 907, 967, 1021, 1087, 1123, 1171, 1249, 1303, 1423, 1447, 1483, 1489, 1543, 1579, 1597, 1627, 1699, 1723, 1747, 1783
Offset: 1

Views

Author

Keywords

Crossrefs

A034847 a(n) = 1 + 4*A034780(n).

Original entry on oeis.org

29, 53, 101, 109, 149, 173, 181, 197, 229, 269, 293, 317, 337, 349, 373, 389, 461, 509, 557, 569, 641, 653, 677, 701, 709, 773, 797, 821, 829, 853, 937, 941, 1013, 1021, 1033, 1061, 1069, 1109, 1117, 1181, 1193, 1217, 1229, 1277, 1297, 1301, 1373, 1429, 1481, 1493, 1549, 1597
Offset: 1

Views

Author

Keywords

Comments

a(n) = P(n,4) = 1 + 4*K(n,4) = 1 + 4*A034780(n). P(n,4) are special primes of the form 4k+1. The relevant values of k are given by A034780.
Note that, e.g., 5 and 13 are not in this sequence.

Crossrefs

Programs

  • PARI
    a034693(n) = my(s=1); while(!isprime(s*n+1), s++); s;
    isok(n) = a034693(n) == 4;
    lista(nn) = {for (n=1, nn, if (isok(n), print1(4*n+1, ", ")););} \\ Michel Marcus, May 13 2018

Extensions

More terms from Michel Marcus, May 13 2018
Previous Showing 31-40 of 52 results. Next