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: Martin Ehrenstein

Martin Ehrenstein's wiki page.

Martin Ehrenstein has authored 6 sequences.

A373970 Squares equal to the sum of a cube and a factorial number.

Original entry on oeis.org

1, 9, 25, 121, 784, 1024, 5041, 363609, 542939080336, 160351569000000, 51312167754301440000, 65249379457597440000, 449519240612413440000, 957230928468541440000, 4797276365676433637376, 16367773504928806600704, 308090303428827709440000
Offset: 1

Author

Martin Ehrenstein, Jun 24 2024

Keywords

Examples

			1 = 0^3 + 1!.
25 = 1^3 + 4!.
784 = 4^3 + 6!.
5041 = 1^3 + 7!.
		

Crossrefs

A085692 is a subsequence.

Programs

  • PARI
    is1(n) = {my(sq = n^2, f = 1, k = 1); while(f <= sq && !ispower(sq - f, 3), k++; f *= k); f <= sq;}
    lista(kmax) = for(k = 1, kmax, if(is1(k), print1(k^2, ", "))); \\ Amiram Eldar, Jun 24 2024

Extensions

a(10) from Amiram Eldar, Jun 24 2024
a(11)-a(16) from David A. Corneth, Jun 24 2024
a(17) from Michael S. Branicky, Jun 26 2024

A364785 Primes whose binary representation has more 1-bits than its cube.

Original entry on oeis.org

445317119867, 28498383073019, 114304774692347, 7594322375176157
Offset: 1

Author

Martin Ehrenstein, Aug 07 2023

Keywords

Examples

			445317119867 is a term because it is a prime number and A000120(445317119867) = 31, while A192085(445317119867) = A000120(445317119867^3) = 30.
		

Crossrefs

Intersection of A363799 and A000040.

A352631 Minimum number of zeros in a binary n-digit perfect square, or -1 if there are no such numbers.

Original entry on oeis.org

0, -1, 2, 2, 2, 3, 2, 4, 3, 4, 3, 4, 4, 5, 2, 5, 4, 6, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 8, 6, 8, 8, 6, 7, 7, 8, 8, 9, 8, 9, 9, 8, 9, 10, 9, 9, 10, 9, 9, 9, 9, 10, 10, 10, 10, 11, 10, 11, 11, 11, 9, 9, 11, 11, 11, 12, 11, 12, 11, 12
Offset: 1

Author

Martin Ehrenstein, Mar 25 2022

Keywords

Comments

Is there a formula that is easy to compute?

Examples

			a(6) = 3, because there are two 6-bit squares 36 = 100100_2 and 49 110001_2 with 4 and 3 zeros, respectively.
a(2) = -1, because the first two perfect squares 1 = 1_2 and 4 = 100_2 have 1 and 3 bits, respectively.
		

Crossrefs

Cf. A357658 (maximum 1's).

Programs

  • Python
    from gmpy2 import is_square, popcount
    for n in range(1, 33):
        m=n+1
        for k in range(2**(n-1), 2**n):
            if is_square(k):
                m=min(m, n-popcount(k))
        print(n, -1 if m>n else m)
    
  • Python
    from math import isqrt
    def A352631(n): return -1 if n == 2 else min(n-(k**2).bit_count() for k in range(1+isqrt(2**(n-1)-1),1+isqrt(2**n))) # Chai Wah Wu, Mar 28 2022

Extensions

a(43)-a(71) from Pontus von Brömssen, Mar 26 2022
a(72)-a(80) from Chai Wah Wu, Apr 01 2022

A352599 Number of ways of placing A352426(n) nonattacking white-square queens on an n X n board.

Original entry on oeis.org

1, 2, 4, 6, 2, 6, 64, 112, 68, 80, 32, 36, 28, 1414, 576, 384, 40, 70396, 40896, 22468, 9808, 1152, 252, 2246138, 482272, 185932
Offset: 1

Author

Martin Ehrenstein, Mar 22 2022

Keywords

Comments

Equivalently the number of ways of placing the maximal number of nonattacking black-square queens on an inverted n X n chessboard, that is a board with the a1 square white, the a2 and b1 squares black, etc.

Crossrefs

Cf. A352241 (maximal number for black-squares), A352325 (black-squares counts), A352426 (maximal number for white-squares), this sequence (white-squares counts).

Programs

Formula

a(2n) = A352325(2n).

Extensions

a(21)-a(24) from Vaclav Kotesovec, Mar 23 2022
a(25)-a(26) from Vaclav Kotesovec, Apr 01 2022

A352426 Maximal number of nonattacking white-square queens on an n X n chessboard.

Original entry on oeis.org

0, 1, 1, 2, 4, 4, 4, 5, 6, 7, 8, 9, 10, 10, 11, 12, 13, 13, 14, 15, 16, 17, 18, 18, 19, 20, 21, 21, 22, 23, 24, 25, 26, 26, 27, 28, 29, 29, 30, 31, 32, 33, 33, 34, 35, 36, 36, 37, 38, 39, 40, 40, 41, 42, 43, 44, 44, 45, 46, 47, 48, 48, 49, 50, 51, 51, 52, 53
Offset: 1

Author

Martin Ehrenstein, Mar 16 2022

Keywords

Comments

Equivalently the maximal number of nonattacking black-square queens on an inverted n X n chessboard, that is a board with the a1 square white, the a2 and b1 squares black, etc.

Crossrefs

Programs

  • Python
    def fill(rows, queens, leftattack, notdownattack, rightattack, color):
        global c
        available = ~leftattack & notdownattack & ~rightattack & color
        if rows==1:
            if available==0:
                c[queens] = c.get(queens, 0) + 1
            else:
                c[queens+1] = c.get(queens+1, 0) + bin(available).count('1')
            return
        while available:
            attack = available & -available
            fill(rows-1, queens+1, (leftattack|attack)<<1, notdownattack&~attack, (rightattack|attack)>>1, ~color)
            available &= available - 1
        fill(rows-1, queens, leftattack<<1, notdownattack, rightattack>>1, ~color)
    print(' n a(n)    count')
    for n in range(1, 32):
        c=dict()
        fill(n, 0, 0, (1<
    				

Formula

a(2n) = A352241(2n).

Extensions

a(17)-a(24) from Vaclav Kotesovec, Mar 17 2022
a(25)-a(26) from Vaclav Kotesovec, Mar 20 2022
a(27) onwards from Andy Huchala, Mar 27 2024

A340712 Primes p such that p divides (2 + product of primes < p).

Original entry on oeis.org

557, 248137, 4085791, 519807973
Offset: 1

Author

Martin Ehrenstein, Jan 16 2021

Keywords

Examples

			557 is in the sequence because 2 + A034386(557 - 1) = 557 * 4627335992...5904782776 (220 digits).
		

Crossrefs

Programs

  • Python
    from sympy import nextprime
    def aupto(limit):
      p, psharp = 3, 2
      while p <= limit:
        if (psharp+2)%p == 0: print(p, end=", ")
        psharp, p = psharp*p, nextprime(p)
    aupto(500000) # Michael S. Branicky, Mar 24 2021