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: William C. Laursen

William C. Laursen's wiki page.

William C. Laursen has authored 13 sequences. Here are the ten most recent ones:

A374578 Pierpont primes are primes of the form 2^t*3^u + 1; this sequence gives the u's in order.

Original entry on oeis.org

0, 0, 0, 1, 1, 0, 2, 2, 2, 1, 3, 4, 1, 0, 3, 5, 2, 1, 2, 4, 6, 4, 6, 3, 5, 4, 1, 7, 2, 9, 8, 0, 7, 2, 8, 4, 10, 9, 6, 1, 8, 5, 2, 6, 3, 5, 4, 9, 4, 12, 11, 3, 14, 3, 15, 5, 7, 16, 13, 3, 10, 4, 17, 10, 11, 12, 3, 4, 1, 8, 5, 8, 4, 11, 7, 15, 12, 2, 10, 1, 22, 4
Offset: 1

Author

William C. Laursen, Jul 11 2024

Keywords

Comments

This sequence gives the exponents of 3's in the Pierpont primes, A374577 gives the exponents of 2's.

Examples

			a(1) = 0, because the first Pierpont prime is 2 = 2^0 * 3^0 + 1.
a(6) = 0, because the sixth Pierpont prime is 17 = 2^4 * 3^0 + 1.
a(7) = 2, because the seventh Pierpont prime is 19 = 2^1 * 3^2 + 1.
		

Crossrefs

Programs

  • Mathematica
    With[{lim = 10^12}, IntegerExponent[Select[Sort@ Flatten@Table[2^i*3^j + 1, {i, 0, Log2[lim]}, {j, 0, Log[3, lim/2^i]}], PrimeQ] - 1, 3]] (* Amiram Eldar, Sep 02 2024 *)
  • PARI
    lista(lim) = {my(s = List()); for(i = 0, logint(lim, 2), for(j = 0, logint(lim >> i, 3), listput(s, 2^i * 3^j + 1))); s = Set(s); for(i = 1, #s, if(isprime(s[i]), print1(valuation(s[i] - 1, 3), ", ")));} \\ Amiram Eldar, Sep 02 2024

Formula

a(n) = A007949(A005109(n)-1).

Extensions

More terms from Stefano Spezia, Jul 12 2024

A374577 Pierpont primes are primes of the form 2^t*3^u + 1; this sequence gives the t's in order.

Original entry on oeis.org

0, 1, 2, 1, 2, 4, 1, 2, 3, 5, 2, 1, 6, 8, 4, 1, 6, 8, 7, 4, 1, 5, 2, 7, 4, 7, 12, 3, 11, 1, 3, 16, 6, 14, 5, 12, 3, 5, 10, 18, 7, 12, 17, 11, 16, 13, 15, 8, 16, 4, 6, 19, 2, 20, 2, 18, 15, 1, 6, 22, 11, 21, 1, 13, 12, 11, 26, 25, 30, 19, 24, 20, 27, 16, 23, 11
Offset: 1

Author

William C. Laursen, Jul 11 2024

Keywords

Comments

This sequence gives the exponents of 2's in the Pierpont primes, A374578 gives the exponents of 3's.

Examples

			a(1) = 0, because the first Pierpont prime is 2 = 2^0 * 3^0 + 1.
a(6) = 4, because the sixth Pierpont prime is 17 = 2^4 * 3^0 + 1.
a(7) = 1, because the seventh Pierpont prime is 19 = 2^1 * 3^2 + 1.
		

Crossrefs

Programs

  • Mathematica
    With[{lim = 10^11}, IntegerExponent[Select[Sort@ Flatten@Table[2^i*3^j + 1, {i, 0, Log2[lim]}, {j, 0, Log[3, lim/2^i]}], PrimeQ] - 1, 2]] (* Amiram Eldar, Sep 02 2024 *)
  • PARI
    lista(lim) = {my(s = List()); for(i = 0, logint(lim, 2), for(j = 0, logint(lim >> i, 3), listput(s, 2^i * 3^j + 1))); s = Set(s); for(i = 1, #s, if(isprime(s[i]), print1(valuation(s[i] - 1, 2), ", ")));} \\ Amiram Eldar, Sep 02 2024

Formula

a(n) = A007814(A005109(n)-1).

Extensions

More terms from Stefano Spezia, Jul 12 2024

A343575 a(n) = floor((2+sqrt(5))^n - 2^(n+1)) mod (20*n).

Original entry on oeis.org

0, 9, 0, 49, 0, 9, 0, 129, 60, 49, 0, 49, 0, 9, 100, 129, 0, 249, 0, 49, 340, 9, 0, 449, 0, 9, 240, 289, 0, 249, 0, 129, 60, 9, 600, 49, 0, 9, 580, 449, 0, 609, 0, 289, 700, 9, 0, 449, 700, 249, 60, 289, 0, 969, 200, 129, 60, 9, 0, 49, 0, 9, 1240, 769, 0, 369, 0
Offset: 1

Author

William C. Laursen, Apr 20 2021

Keywords

Comments

Whenever n is an odd prime, a(n) is 0 (see M. Penn).

Crossrefs

Cf. A345031.

Programs

  • Mathematica
    Table[Mod[Floor[(2+Sqrt[5])^n-2^(n+1)],20n],{n,67}] (* Stefano Spezia, Apr 21 2021 *)
  • PARI
    a(n) = my(M = [6, -7, -2; 1, 0, 0; 0, 1, 0]); 10*((M^n)[3, 1] % (2*n)) - !(n%2) \\ Jianing Song, Jun 07 2021

Formula

From Jianing Song, Jun 07 2021: (Start)
For even n, a(n) = 10*(A345031(n) mod (2*n)) - 1;
For odd n, a(n) = 10*(A345031(n) mod (2*n)). (End)

Extensions

More terms from Stefano Spezia, Apr 21 2021

A342175 a(n) is the difference between the n-th composite number and the smallest larger composite to which it is relatively prime.

Original entry on oeis.org

5, 19, 1, 1, 11, 13, 1, 1, 5, 7, 1, 1, 3, 1, 1, 1, 1, 5, 19, 1, 1, 1, 1, 13, 1, 1, 9, 13, 1, 1, 3, 1, 1, 1, 1, 3, 1, 1, 1, 1, 5, 17, 1, 1, 1, 1, 19, 1, 1, 11, 5, 1, 1, 1, 1, 7, 1, 1, 3, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1, 19, 1, 1, 11, 13, 1, 1, 5, 7, 1, 1, 3, 1
Offset: 1

Author

William C. Laursen, Mar 04 2021

Keywords

Comments

Conjecture: The only nonprime terms are squares (based on checking the first 2 million terms). - Ivan N. Ianakiev, Mar 28 2021
The conjecture above is false (see A353203 for counterexamples). - Ivan N. Ianakiev, Jul 04 2022

Examples

			The first composite number is 4, and the smallest larger composite to which it is coprime is 9, so a(1) = 9 - 4 = 5.
The second composite number is 6, and the smallest larger composite to which it is coprime is 25, so a(2) = 25 - 6 = 19.
		

Crossrefs

Programs

  • Mathematica
    Table[Block[{k = 1}, While[Nand[GCD[#, k] == 1, CompositeQ[# + k]], k++]; k] &@ FixedPoint[n + PrimePi@ # + 1 &, n + PrimePi@ n + 1], {n, 83}] (* Michael De Vlieger, Mar 19 2021 *)
  • PARI
    lista(nn) = {forcomposite(c=1, nn, my(x=c+1); while (isprime(x) || (gcd(x,c) != 1), x++); print1(x - c, ", "););} \\ Michel Marcus, Mar 04 2021
    
  • Python
    from sympy import isprime, gcd, composite
    def A342175(n):
        m = composite(n)
        k = m+1
        while gcd(k,m) != 1 or isprime(k):
            k += 1
        return k-m # Chai Wah Wu, Mar 28 2021

Formula

a(n) = A113496(n) - A002808(n). - Jon E. Schoenfield, Mar 04 2021

A339401 a(n) = numerator of (1/e)^n * Sum_{k>=0}(n^k*k^n)/(n!*k!).

Original entry on oeis.org

1, 1, 3, 19, 63, 322, 44683, 941977, 4677605, 668520163, 21622993111, 9759873853, 31135480907413, 194137920764803, 64440211018897379, 3298807094967155971, 181322497435007616497, 532556590750629416219, 665881649529214120845679, 2596711638295426703997397, 1031081559092352146579024047
Offset: 0

Author

William C. Laursen, Dec 03 2020

Keywords

Crossrefs

Cf. A242817, A339402 (denominators).

Programs

  • Maple
    A:= proc(n, k) option remember; `if`(n=0, 1, (1+
          add(binomial(n-1, j-1)*A(n-j, k), j=1..n-1))*k)
        end:
    a:= n-> numer(A(n$2)/n!):
    seq(a(n), n=0..20);  # Alois P. Heinz, Dec 07 2020
  • Mathematica
    a[n_] := BellB[n, n]/n! // Numerator;
    Table[a[n], {n, 0, 20}] (* Jean-François Alcover, May 27 2022 *)

Formula

a(n)/A339402(n) = A242817(n)/n!. - Pontus von Brömssen, Dec 03 2020
a(n) = numerator([x^n] exp(n*(exp(x)-1))). - Alois P. Heinz, Dec 07 2020

A339402 a(n) = denominator of (1/e)^n * Sum_{k>=0}(n^k*k^n)/(n!*k!).

Original entry on oeis.org

1, 1, 1, 2, 2, 3, 120, 720, 1008, 40320, 362880, 45360, 39916800, 68428800, 6227020800, 87178291200, 1307674368000, 1046139494400, 355687428096000, 376610217984000, 40548366802944000, 2432902008176640000, 5676771352412160000, 40142883134914560000, 25852016738884976640000
Offset: 0

Author

William C. Laursen, Dec 03 2020

Keywords

Crossrefs

Cf. A339401 for numerators and relation to A242817.

Programs

  • Maple
    A:= proc(n, k) option remember; `if`(n=0, 1, (1+
          add(binomial(n-1, j-1)*A(n-j, k), j=1..n-1))*k)
        end:
    a:= n-> denom(A(n$2)/n!):
    seq(a(n), n=0..30);  # Alois P. Heinz, Dec 07 2020
  • Mathematica
    a[n_] := BellB[n, n]/n! // Denominator;
    Table[a[n], {n, 0, 30}] (* Jean-François Alcover, May 27 2022 *)

Formula

A339401(n)/a(n) = A242817(n)/n!. - Pontus von Brömssen, Dec 03 2020
a(n) = denominator([x^n] exp(n*(exp(x)-1))). - Alois P. Heinz, Dec 07 2020

A336784 Number of steps in Conway's Game of Life for a block and row of n cells to stabilize.

Original entry on oeis.org

0, 1, 2, 551, 4, 74, 77, 38, 15, 16, 16, 15, 1185, 41, 17, 84, 273, 21, 25, 20, 1342, 164, 19, 51, 66, 55, 62, 65, 78, 93, 34, 79, 141, 105, 56, 133, 357, 2621, 100, 119, 799, 278, 149, 305, 305, 126, 99, 227, 387, 272, 274, 465, 714, 580, 689, 172, 282, 2163
Offset: 0

Author

William C. Laursen, Aug 04 2020

Keywords

Examples

			As a block by itself is stable, a(0)=0.
. . . .
. o o .
. o o .
. . . .
A block with a single square adjacent will turn into a boat on the next tick, which is stable.
. . . . .|. . . . .
. o o . .|. o o . .
. o o . .|. o . o .
. . . o .|. . o . .
. . . . .|. . . . .
A block with a row of two squares will take two generations to turn into a boat.
. . . . . .|. . . . .|. . . . .
. o o . . .|. o o . .|. o o . .
. o o . . .|. o . . .|. o . o .
. . . o o .|. . o o .|. . o . .
. . . . . .|. . . . .|. . . . .
A block with a row of three squares is known as a methuselah (see Wikipedia link), taking 551 generations to stabilize. The final configuration has two escaped gliders, one blinker, eight blocks, two boats, one ship, two beehives, one loaf, and one fleet. Only the initial configuration is shown below.
. . . . . . .
. o o . . . .
. o o . . . .
. . . o o o .
. . . . . . .
		

A333451 Expansion of golden ratio (1 + sqrt(5))/2 in base 3.

Original entry on oeis.org

1, 1, 2, 1, 2, 0, 0, 1, 1, 2, 2, 0, 2, 1, 2, 1, 0, 2, 0, 0, 1, 0, 2, 1, 0, 0, 1, 0, 2, 0, 0, 1, 0, 2, 0, 1, 1, 2, 2, 1, 0, 2, 1, 2, 0, 0, 2, 2, 1, 1, 1, 0, 1, 1, 0, 0, 1, 0, 1, 2, 2, 1, 1, 2, 0, 0, 2, 1, 0, 0, 0, 2, 1, 0, 0, 0, 1, 2, 0, 2, 1, 1, 1, 2, 2, 2, 0, 2, 2, 0, 0, 2, 0, 2, 1, 1, 0, 2, 2, 1, 0
Offset: 1

Author

William C. Laursen, Mar 21 2020

Keywords

Examples

			1.12120011220212102001021001...
		

Crossrefs

Programs

  • Mathematica
    RealDigits[ (1+Sqrt[5])/2, 3, 1000][[1]]
  • PARI
    a(n) = floor(quadgen(5)*3^(n-1))%3 \\ Chittaranjan Pardeshi, Feb 06 2023

A333452 Expansion of golden ratio (1 + sqrt(5))/2 in base 4.

Original entry on oeis.org

1, 2, 1, 3, 2, 0, 3, 1, 3, 1, 3, 2, 1, 2, 3, 2, 1, 1, 3, 3, 3, 1, 0, 2, 2, 1, 3, 3, 0, 0, 1, 1, 1, 3, 3, 0, 3, 2, 1, 3, 0, 3, 0, 0, 0, 1, 2, 0, 0, 1, 1, 3, 0, 3, 2, 3, 1, 3, 0, 2, 0, 0, 3, 1, 0, 0, 1, 0, 0, 2, 0, 0, 2, 0, 2, 1, 3, 1, 2, 2, 3, 3, 3, 0, 3, 2, 2, 0
Offset: 1

Author

William C. Laursen, Mar 21 2020

Keywords

Examples

			1.213203131321232113331022...
		

Crossrefs

Programs

  • Mathematica
    RealDigits[ (1+Sqrt[5])/2, 4, 1000][[1]]

Extensions

More terms from Jinyuan Wang, Mar 21 2020

A333454 Expansion of golden ratio (1 + sqrt(5))/2 in base 6.

Original entry on oeis.org

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

Author

William C. Laursen, Mar 21 2020

Keywords

Examples

			1.34125455435343145134223514015012004525012404411401...
		

Crossrefs

Programs

  • Mathematica
    RealDigits[ (1+Sqrt[5])/2, 6, 1000][[1]]

Extensions

More terms from Jinyuan Wang, Mar 21 2020