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: Jack Braxton

Jack Braxton's wiki page.

Jack Braxton has authored 14 sequences. Here are the ten most recent ones:

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

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

A362035 Numbers that occur three or more times in A362034.

Original entry on oeis.org

2, 17, 29, 43, 59, 61, 83, 103, 107, 137, 167, 173, 211, 251, 257, 307, 359, 379, 419, 479, 499, 541, 613, 631, 673, 691, 761, 769, 853, 887, 937, 991, 1031, 1129, 1151, 1231, 1361, 1399, 1459, 1471, 1493, 1583, 1697, 1823, 1831, 1973, 2111, 2179, 2243, 2251, 2393
Offset: 1

Author

Jack Braxton, Apr 05 2023

Keywords

Comments

All terms are prime because all terms in A362034 are.

Examples

			2 is a term because in A362034, 2 occurs at positions 1, 2, and 3.
17 is a term because in A362034, 17 occurs at positions 13, 23, and 27.
		

Crossrefs

Programs

  • Mathematica
    nn = 300; q = Prime[nn]; c[] = 0; p[] = False; T[n_, 0] := T[n, n] = 2; T[n_, k_] := T[n, k] = NextPrime[T[n - 1, k - 1] + T[n - 1, k] - 1]; TakeWhile[Sort@ Reap[Do[(c[#]++; If[And[c[#] >= 3, ! p[#]], Sow[#]; p[#] = True]) &@ T[n, k], {n, 0, nn}, {k, 0, n}] ][[-1, -1]], # <= q &] (* Michael De Vlieger, Apr 06 2023 *)

A362037 Sums of the rows in A362034.

Original entry on oeis.org

2, 4, 9, 18, 43, 88, 183, 370, 761, 1536, 3081, 6202, 12427, 24908, 49875, 99834, 199769, 399572, 799289, 1598726, 3197557, 6395400, 12791045, 25582310, 51164767, 102329800, 204659929, 409320270, 818640731, 1637281876, 3274564199, 6549128694, 13098257783, 26196515972
Offset: 1

Author

Jack Braxton, Apr 05 2023

Keywords

Examples

			a(3) = 9, the 3rd row in A362034 is 2 5 2; and 2 + 5 + 2 = 9.
a(4) = 18, the 4th row in A362034 is 2, 7, 7, 2; and 2+7+7+2 = 18.
		

Crossrefs

Cf. A362034.

Programs

  • Mathematica
    T[n_, 0] := T[n, n] = 2; T[n_, k_] := T[n, k] = NextPrime[T[n - 1, k - 1] + T[n - 1, k] - 1]; Total /@ Table[T[n, k], {n, 0, 33}, {k, 0, n}] (* Michael De Vlieger, Apr 06 2023 *)

A362036 The prime indices of A362034.

Original entry on oeis.org

1, 1, 1, 1, 3, 1, 1, 4, 4, 1, 1, 5, 7, 5, 1, 1, 6, 10, 10, 6, 1, 1, 7, 14, 17, 14, 7, 1, 1, 8, 18, 27, 27, 18, 8, 1, 1, 9, 23, 39, 47, 39, 23, 9, 1, 1, 10, 28, 54, 75, 75, 54, 28, 10, 1, 1, 11, 33, 72, 115, 135, 115, 72, 33, 11, 1, 1, 12, 40, 95, 167, 222, 222, 167, 95, 40, 12, 1
Offset: 0

Author

Jack Braxton, Apr 05 2023

Keywords

Examples

			Triangle begins:
      k=0  1  2  3  4
  n=0:  1;
  n=1:  1, 1;
  n=2:  1, 3, 1;
  n=3:  1, 4, 4, 1;
  n=4:  1, 5, 7, 5, 1;
  n=5:  ...
		

Crossrefs

Programs

  • Mathematica
    T[n_, 0] := T[n, n] = 2; T[n_, k_] := T[n, k] = NextPrime[T[n - 1, k - 1] + T[n - 1, k] - 1]; Table[PrimePi@ T[n, k], {n, 0, 11}, {k, 0, n}] // Flatten (* Michael De Vlieger, Apr 06 2023 *)
  • PARI
    t(n,k) = if (n==0, 2, if (k==0, 2, if (k==n, 2, nextprime(t(n-1,k-1) + t(n-1,k))))); \\ A362034
    T(n,k) = primepi(t(n,k)); \\ Michel Marcus, Apr 07 2023

Formula

T(n,k) = A000720(A362034(n,k)).

A362034 Triangle read by rows: T(n,0) = T(n,n) = 2, 0 < k < n: T(n,k) = smallest prime not less than T(n-1,k) + T(n-1,k-1).

Original entry on oeis.org

2, 2, 2, 2, 5, 2, 2, 7, 7, 2, 2, 11, 17, 11, 2, 2, 13, 29, 29, 13, 2, 2, 17, 43, 59, 43, 17, 2, 2, 19, 61, 103, 103, 61, 19, 2, 2, 23, 83, 167, 211, 167, 83, 23, 2, 2, 29, 107, 251, 379, 379, 251, 107, 29, 2, 2, 31, 137, 359, 631, 761, 631, 359, 137, 31, 2
Offset: 0

Author

Jack Braxton, Apr 05 2023

Keywords

Comments

In order to get the next number in the row, you add the two numbers above it, and find the next prime.
3 is the only prime number that never shows up.
5 is the only prime number that only shows up once; every prime number above 5 shows up at least twice.

Examples

			Triangle begins:
      k=0  1   2   3   4   5   6   7   8  9 10
  n=0:  2
  n=1:  2  2
  n=2:  2  5   2
  n=3:  2  7   7   2
  n=4:  2 11  17  11   2
  n=5:  2 13  29  29  13   2
  n=6:  2 17  43  59  43  17   2
  n=7:  2 19  61 103 103  61  19   2
  n=8:  2 23  83 167 211 167  83  23   2
  n=9:  2 29 107 251 379 379 251 107  29  2
 n=10:  2 31 137 359 631 761 631 359 137 31  2
		

Crossrefs

Programs

  • Maple
    for n from 0 to 10 do
      T[n,0]:= 2: T[n,n]:= 2:
      for k from 1 to n-1 do
        T[n,k]:= nextprime(T[n-1,k-1]+T[n-1,k]-1)
      od
    od:
    for n from 0 to 10 do
      seq(T[n,k],k=0..n)
    od; # Robert Israel, Apr 05 2023
  • Mathematica
    T[n_, 0] := T[n, n] = 2; T[n_, k_] := T[n, k] = NextPrime[T[n - 1, k - 1] + T[n - 1, k] - 1]; Table[T[n, k], {n, 0, 10}, {k, 0, n}] // Flatten (* Michael De Vlieger, Apr 06 2023, after Maple *)
  • PARI
    T(n,k) = if (n==0, 2, if (k==0, 2, if (k==n, 2, nextprime(T(n-1,k-1) + T(n-1,k))))); \\ Michel Marcus, Apr 07 2023

Formula

T(n,k) = A007918(T(n-1,k-1) + T(n-1,k)) for 0 < k < n. - Robert Israel, Apr 05 2023

A361977 a(n) is the largest prime p such that 2^p - 1 <= 10^n.

Original entry on oeis.org

3, 5, 7, 13, 13, 19, 23, 23, 29, 31, 31, 37, 43, 43, 47, 53, 53, 59, 61, 61, 67, 73, 73, 79, 83, 83, 89, 89, 89, 97, 101, 103, 109, 109, 113, 113, 113, 113, 127, 131, 131, 139, 139, 139, 149, 151, 151, 157, 157, 163, 167, 167, 173, 179, 181, 181, 181, 191, 193
Offset: 1

Author

Jack Braxton, Apr 02 2023

Keywords

Examples

			a(5) = 13, 2^13 - 1 = 8192 < 10^5.
		

Programs

  • Python
    from sympy import prevprime
    def A361977(n): return prevprime((10**n-1).bit_length()) # Chai Wah Wu, Apr 02 2023

Formula

a(n) = A151799(A067497(n)). - Alois P. Heinz, Apr 02 2023

A361436 Primes of the form k! - Sum_{i=1..k-1} (-1)^(k-i)*i!.

Original entry on oeis.org

3, 7, 29, 139, 821, 5659, 44741, 515616581, 1389068025019, 2390389721955353653838200398484730341485707553165512827613149996957838364422981
Offset: 1

Author

Jack Braxton, Mar 11 2023

Keywords

Comments

Primes of the form k! + A005165(k - 1).

Examples

			139 is in the sequence because it is 5! + (4! - 3! + 2! - 1!).
		

Crossrefs

Cf. A005165 (alternating factorials), A071828, A361437 (the k's).

Programs

  • PARI
    \\ here b(n) is n! + A005165(n-1).
    b(n) = {n! - sum(i=1, n-1, (-1)^(n-i)*i!)}
    { for(k=1, 150, if(ispseudoprime(b(k)), print1(b(k), ", "))) } \\ Andrew Howroyd, Mar 12 2023

A361509 a(n) = smallest Fibonacci number F(k) such that F(k) + F(n) is a prime, or -1 if no such F(k) exists.

Original entry on oeis.org

2, 1, 1, 0, 0, 0, 3, 0, 2, 3, 34, 0, 5, 0, 2, 3, 34, 0, 987, 46368, 2584, 3, 2, 0, 13, 144
Offset: 0

Author

Jack Braxton, Mar 26 2023

Keywords

Comments

a(26) is currently unknown.
a(26) > 10^7000 if it is not -1. - Robert Israel, Apr 03 2023

Crossrefs

Programs

  • Maple
    with(combinat):
    a:=[]; b:=[]; for n from 0 to 25 do
    k:=0; t1:=fibonacci(n);
    while not isprime( fibonacci(k)+t1) do k:=k+1; od:
    a:=[op(a),fibonacci(k)]; b:=[op(b),k];
    od:
    a; # A361509
    b; # A361510
  • Mathematica
    a[n_] := Module[{fn = Fibonacci[n], k = 0}, While[! PrimeQ[fn + Fibonacci[k]], k++]; Fibonacci[k]]; Array[a, 26, 0] (* Amiram Eldar, Mar 30 2023 *)
  • PARI
    a(n) = my(k=0, fn=fibonacci(n)); while (!isprime(fn+fibonacci(k)), k++); fibonacci(k); \\ Michel Marcus, Mar 30 2023

Formula

a(n) = A000045(A361902(A000045(n))) (unless A361902(A000045(n)) = -1). - Pontus von Brömssen, Mar 30 2023

Extensions

Edited by N. J. A. Sloane, Mar 30 2023

A361510 a(n) = smallest k >= 0 such that Fibonacci(k) + Fibonacci(n) is a prime, or -1 if no such k exists.

Original entry on oeis.org

3, 1, 1, 0, 0, 0, 4, 0, 3, 4, 9, 0, 5, 0, 3, 4, 9, 0, 16, 24, 18, 4, 3, 0, 7, 12
Offset: 0

Author

Jack Braxton, Mar 26 2023

Keywords

Comments

a(26) is currently unknown.

Crossrefs

Programs

  • Maple
    See A361509.
  • Mathematica
    a[n_] := Module[{fn = Fibonacci[n], k = 0}, While[! PrimeQ[fn + Fibonacci[k]], k++]; k]; Array[a, 26, 0] (* Amiram Eldar, Mar 30 2023 *)
  • PARI
    a(n) = my(k=0, fn=fibonacci(n)); while (!isprime(fn+fibonacci(k)), k++); k; \\ Michel Marcus, Mar 30 2023

Formula

a(n) = A361902(A000045(n)). - Pontus von Brömssen, Mar 30 2023

Extensions

Edited by N. J. A. Sloane, Mar 30 2023

A361437 Numbers k such that k! - Sum_{i=1..k-1} (-1)^(k-i)*i! is prime.

Original entry on oeis.org

2, 3, 4, 5, 6, 7, 8, 12, 15, 58, 59, 102, 111, 118, 164, 291, 589, 685, 1671, 1900, 1945, 4905, 9564
Offset: 1

Author

Jack Braxton, Mar 11 2023

Keywords

Comments

Numbers k such that k! + A005165(k - 1) is prime.
a(23) > 7000. - Hugo Pfoertner, Mar 15 2023

Examples

			2 is in the sequence because 2! + 1! = 3.
3 is in the sequence because 3! + (2! - 1!) = 7.
4 is in the sequence because 4! + (3! - 2! + 1!) = 29.
5 is in the sequence because 5! + (4! - 3! + 2! - 1!) = 139.
		

Crossrefs

Cf. A361436 (the corresponding primes).
Cf. A001272, A005165 (alternating factorials), A071828.

Programs

  • PARI
    isok(k) = isprime(k! + sum(i=1, k-1, (-1)^(i+1)*(k-i)!)); \\ Michel Marcus, Mar 12 2023

Extensions

Missing a(10) inserted and a(12)-a(18) from Andrew Howroyd, Mar 12 2023
a(19)-a(22) from Hugo Pfoertner, Mar 13 2023
a(23) from Michael S. Branicky, Oct 02 2024