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: , k

, k's wiki page.

, k has authored 2156 sequences. Here are the ten most recent ones:

A380023 a(n) = a(n-1) * a(n-2) * (1 - 2 / (n * (n-1))), with a(1) = 2, a(2) = 3.

Original entry on oeis.org

2, 3, 4, 10, 36, 336, 11520, 3732480, 41803776000, 152564385447936000, 6261807987664209366220800000, 940854207318376503485146088437972992000000000, 5815917000990435607656487842294594291938222391518950745702400000000000000
Offset: 1

Author

Hamza K. Özer, Jan 09 2025

Keywords

Comments

This sequence is produced when Moessner's Magic is applied to the Fibonacci sequence.

Examples

			For n = 6, a(6) = 336 solutions are 36 * 10 * (1 - 2/(6*5)) = 336 or 7 * 5^0 * 4^1 * 3^1 * 2^2 = 336.
		

References

  • J. H. Conway and R. K. Guy, "The Book of Numbers", Springer-Verlag, 1996, page 63

Crossrefs

Programs

  • Mathematica
    RecurrenceTable[{a[n] == a[n-1]*a[n-2]*(1 - 2/(n*(n-1))), a[1] == 2, a[2] == 3}, a, {n, 1, 14}] (* Amiram Eldar, Jan 09 2025 *)
  • Python
    import math
    def A380023(n): return None if n < 1 else (n + 1) * math.prod([(n - k - 1) ** fibo(k) for k in range(0, n - 1)])
    # fibo(k) is the function for calculating the k-th Fibonacci number

Formula

a(n) = (n+1) * A230053(n-2), for n >= 2.
a(n) = (n+1) * Product_{k=0..n-2} (n-k-1)^Fibonacci(k), for n >= 2.
Using Moessner's Magic (page 63 of The Book of Numbers), start with writing the counting numbers and cross out each Fibonacci number. Underneath, write the partial sums of the uncrossed terms in the first row and cross out the terms which are offset one place to left of the crossed out terms in the first row. Continuing this process for successive rows produces this sequence:
1 2 3 4 5 6 7 8 9 10 11 12 13
* * * 4 * 10 17 * 26 36 45 57 *
* * * * * 10 * * 36 72 117 * *
* * * * * * * * 36 108 * * *
* * * * * * * * 36 * * * *

A377880 Nonprime cubefree numbers.

Original entry on oeis.org

1, 4, 6, 9, 10, 12, 14, 15, 18, 20, 21, 22, 25, 26, 28, 30, 33, 34, 35, 36, 38, 39, 42, 44, 45, 46, 49, 50, 51, 52, 55, 57, 58, 60, 62, 63, 65, 66, 68, 69, 70, 74, 75, 76, 77, 78, 82, 84, 85, 86, 87, 90, 91, 92, 93, 94, 95, 98, 99, 100, 102, 105, 106, 110, 111
Offset: 1

Author

Sahil K. Das, Nov 10 2024

Keywords

Crossrefs

Intersection of A004709 and A018252.
Cf. A000469.

Programs

  • Maple
    q:= n-> not isprime(n) and andmap(i-> i[2]<3, ifactors(n)[2]):
    select(q, [$1..111])[];  # Alois P. Heinz, Nov 10 2024
  • Mathematica
    Select[Range[120], !PrimeQ[#] && Max[FactorInteger[#][[;; , 2]]] < 3 &] (* Amiram Eldar, Nov 10 2024 *)
  • Python
    from sympy import primepi, mobius, integer_nthroot
    def A377880(n):
        def f(x): return int(n+x+primepi(x)-sum(mobius(k)*(x//k**3) for k in range(1, integer_nthroot(x,3)[0]+1)))
        m, k = n, f(n)
        while m != k: m, k = k, f(k)
        return m # Chai Wah Wu, Nov 13 2024

A376071 Number of (non-null) regular subgraphs of a complete graph having n labeled vertices.

Original entry on oeis.org

1, 4, 11, 32, 99, 452, 2829, 59728, 1548859, 168927280, 12165067397, 7074423251656, 2294426405588381, 4218009215702408336, 3810376434461485027083, 35102248193591661086986784, 156873334244228518638713218203, 4144940994226400702145709978496296
Offset: 1

Author

Maharshee K. Shah, Sep 08 2024

Keywords

Crossrefs

Cf. A295193.

Formula

a(n) = Sum_{k=1..n} binomial(n,k)*A295193(k). - Andrew Howroyd, Sep 08 2024

Extensions

a(9) onwards from Andrew Howroyd, Sep 08 2024

A375098 Diagonals of a Euclidian solid such that there exists a Pythagorean quadruple d^2=a^2+b^2+c^2 that is more cube-like than any prior value of d.

Original entry on oeis.org

3, 9, 11, 41, 123, 153, 571, 1713, 2131, 7953, 23859, 29681, 110771, 332313, 413403, 1542841, 4628523, 5757961, 21489003, 64467009, 80198051, 299303201, 897909603, 1117014753, 4168755811, 12506267433, 15558008491, 58063278153, 174189834459, 216695104121
Offset: 1

Author

Christian N. K. Anderson, Mark K. Transtrum, and David D. Allred, Jul 29 2024

Keywords

Comments

To determine how "cube-like" a Pythagorean quad is, we use the quotient C/(C-a*b*c) where C is the volume of an ideal cube for a given diagonal d, C=(d/sqrt(3))^3. A ratio of 100 indicates that the best {a,b,c} combination creates a solid 1 part per 100 smaller than the ideal cube volume.
Contains all the terms in A001835 and A079935 except the leading 1s. For such a term b(m) contained in a(n) from those sequences, 2*b(m) will tie the current record, while 3*b(m) will tie but will also break the current record exactly half the time and thus appear as a(n+1). This means round((2+sqrt(3))*b(m)) will also be in the sequence as either a(n+1) or a(n+2) if a better quad for 3*b(n) was found.
The constant (2+sqrt(3)) follows from the recurrence relationship b(n)=4*b(n-1)-b(n-2). The constant can be represented as the continued fraction 3,1,2,1,2,1,2,1,2,.... The equivalents for the 2D case (A001653) are 3+2*sqrt(2) and {5,1,4,1,4,1,4,1,4,...}.
We conjecture this method provides complete solutions. This was confirmed directly by brute-force testing up to 1e7 (optimized using the sum-of-two-squares theorem for a given d^2-a^2 = b^2 + c^2; see link below).

Examples

			3 is in the sequence because 3^2=1^2+2^2+2^2 is the smallest Pythagorean quad, with an error of one part in 4.344.
6 is NOT in the sequence because {6,2,4,4} is the most cube-like Pythagorean quad, but only ties the previous record without breaking it.
7 is NOT in the sequence because the most cube-like quad {7,2,3,6} has an error of one part in 2.2, worse than that for d=3.
9 is in the sequence NOT because of {9,3,6,6} which ties the previous record, but because {9,4,4,7} improves on the previous record with an error of one part in 4.958.
		

Crossrefs

Cf. A096907, A096908, A096909, A096910 for lists of a, b, c, and d of the 10,000 first Pythgorean quads, sorted by ascending d.
Contains all terms in A001835 and A079935 except the leading 1s.
Cf. A001653: The 2D equivalent of this sequence (i.e., right triangle whose legs are closest to equal)

Programs

  • Mathematica
    (* An efficient program is provided in the links section. *)

Formula

For n == 0 (mod 3), a(n) = 4*a(n-2)-a(n-3) OR a(n) = floor(a(n-1)*(2+sqrt(3))/3),
For n == 1 (mod 3), a(n) = 4*a(n-2)-a(n-1) OR a(n) = floor(a(n-1)*(2+sqrt(3))),
For n == 2 (mod 3), a(n) = 3*a(n-1).

A373629 a(n) = sum of all numbers whose binary expansion is n bits long, starts and ends with a 1 bit, and contains no 00 bit pairs.

Original entry on oeis.org

1, 3, 12, 39, 131, 426, 1389, 4503, 14596, 47259, 152991, 495162, 1602521, 5186067, 16782828, 54310911, 175754731, 568755690, 1840534485, 5956098495, 19274345876, 62373103443, 201843619047, 653179698234, 2113733947681, 6840186809691, 22135309606524, 71631366769623
Offset: 1

Author

Iskender Ozturk, Melike Caliskan, Betül Küçükgök, Ecem Yanik, Irem Türker, Rüya Kılıçarslan, Jun 11 2024

Keywords

Comments

The numbers that are summed are the terms t of A247648 in the range 2^(n-1) <= t < 2^n.
There are Fibonacci(n) of these numbers (per Grimaldi's exercise, in which closed walks on the u-v graph there are a 1 bit at a visit to u and a 0 bit at a visit to v), and this allows recurrences etc. for a(n).

Examples

			For n=5, the terms of A247648 that are in the interval [16, 31] are 21, 23, 27, 29, and 31, so a(5) = 21+23+27+29+31 = 131.
		

References

  • R. Grimaldi, (2012). Fibonacci and Catalan Numbers: An Introduction, page 80, Example 12.1.

Crossrefs

Cf. A000045 (Fibonacci numbers), A247648.

Programs

  • Mathematica
    LinearRecurrence[{3, 3, -6, -4}, {1, 3, 12, 39}, 30] (* Paolo Xausa, Jun 19 2024 *)
  • PARI
    Vec(x/((1 - x - x^2)*(1 - 2*x - 4*x^2)) + O(x^40)) \\ Michel Marcus, Jun 16 2024

Formula

a(n) = Sum_{i=F(n+1)..F(n+2)-1} A247648(i) where F(n) = A000045(n) is the n-th Fibonacci number.
a(n) = a(n-1) + a(n-2) + F(n)*2^(n-1).
a(n) = 3*a(n-1) + 3*a(n-2) - 6*a(n-3) - 4*a(n-4).
a(n) = F(n)*(2^n-1) - Sum_{i=1..n-1} F(i)*F(n-i-1)*2^(n-i-1).
G.f.: x/((1 - x - x^2)*(1 - 2*x - 4*x^2)).
E.g.f.: 2*(exp(x)*(sqrt(5)*cosh(sqrt(5)*x) + 7*sinh(sqrt(5)*x)) - exp(x/2)*(sqrt(5)*cosh(sqrt(5)*x/2) + 4*sinh(sqrt(5)*x/2)))/(11*sqrt(5)). - Stefano Spezia, Jun 19 2024

A362681 The number of steps, starting from n, to reach x<=2 in an iteration x <- 2x - {sum of proper factors of 2x}.

Original entry on oeis.org

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

Keywords

Comments

A proper factor is defined as any divisor of n other than 1 and itself (Derbyshire).
The iteration step is x <- A157449(2x).
The iteration ends on the step after reaching half of any abundant number A005101/2.
a(1682)=7 is the only number over 6 in the first 10^6 terms.
Powers of 2 reach 2 in the first step, and then would enter an infinite loop if the iteration ended only when x <= 1.

References

  • J. Derbyshire, Prime Obsession: Bernhard Riemann and the Greatest Unsolved Problem in Mathematics. Penguin, 2004, p. 32.

Crossrefs

Cf. A157449, A005101, A362684 (indices of records).

Programs

  • PARI
    a(n) = my(ret=0); while(n>2, n = 4*n+1-sigma(2*n); ret++); ret; \\ Kevin Ryde, May 09 2023

A362684 a(n) is the index at which n first occurs in A362681.

Original entry on oeis.org

1, 3, 5, 7, 26, 49, 632, 1682
Offset: 0

Keywords

Comments

Among terms n=1..7, each number iterates through the previous terms. For example, the first iteration takes 1682 to 632=a(6), the second takes 632 to 49=a(5) and so forth.
1682 is the only number < 10^6 that requires 7 iterations to reach completion.
a(8), if it exists, is larger than 10^6.
a(8) > 10^9. - Michel Marcus, Oct 11 2023

Examples

			a(7) = 1682 because the first number to require 7 iterations to reach 2 or less is 1682.
Each iteration step is n <- 2n - {sum of proper factors of 2n} = A157449(2n); for n = 1682, this gives 2n = 3364, 3364 - (2 + 4 + 29 + 58 + 116 + 841 + 1682) = 632, which is a(6).
Note that the proper factors of x are all divisors of x other than 1 and x.
		

Crossrefs

Extensions

a(0)=1 prepended by Michel Marcus, Oct 11 2023

A361517 The value of n for which the two-player impartial {0,1}-Toggle game on a generalized Petersen graph GP(n,2) with a (1,0)-weight assignment is a next-player winning game.

Original entry on oeis.org

3, 4, 5, 11, 17, 27, 35, 37, 49, 59, 69, 81, 91, 103, 115, 123, 135, 137, 167, 175, 189, 199, 207, 287, 295, 307, 361, 1051, 2507, 2757, 2917, 3057, 3081, 7255, 7361, 7871, 16173
Offset: 3

Author

Keywords

Comments

The two-player impartial {0,1}-Toggle game is played on a simple connected graph G where each vertex is assigned an initial weight of 0 or 1.
A Toggle move consists of selecting a vertex v and switching its weight as well as the weights of each of its neighbors. This move is only legal provided the weight of vertex v is 1 and the total sum of the vertex weights decreases.
In the special case G=GP(n,2), a (1,0)-weight assignment is one in which each vertex of the outer polygon is assigned weight 1 and each vertex of the inner polygon(s) is assigned weight 0.

Examples

			For n = 3, the {0,1}-Toggle game on GP(3,2) with a (1,0)-weight assignment is a next-player winning game.
For n = 5, the {0,1}-Toggle game on GP(5,2) with a (1,0)-weight assignment is a next-player winning game.
		

References

  • E. R. Berlekamp, J. H. Conway, and R. K. Guy, Winning Ways for Your Mathematical Plays, Vol. 1, CRC Press, 2001.

Crossrefs

Programs

  • CGSuite
    # See Levandosky link

A359446 a(n) is the period of the decimal expansion of 1/A243110(n).

Original entry on oeis.org

1, 2, 3, 4, 7, 5, 21, 29, 20, 22, 7, 10, 11, 18, 35, 51, 45, 61, 9, 11, 14, 17, 15, 16, 21, 47, 51, 54, 55, 24, 28, 37, 13, 44, 44, 26, 17
Offset: 1

Author

Pedro K. Krause, Jan 01 2023

Keywords

Comments

Equivalently, a(n) is the period of the decimal expansion of the reciprocals of the corresponding primes in the records of A060370, that is, of the primes that set a record for the ratio between them and the period of its reciprocal.

Examples

			a(5) = 7 because the 5th term of A243110 is 239 and 1/239 = 0.0041841... which has a period of 7.
		

Crossrefs

Programs

  • Python
    from sympy import n_order, nextprime
    p = 3
    best = 0
    while True:
        if p!=5:
            period = n_order(10,p)
            k = (p-1)//period
            if k > best:
                best = k
                print(period, end=',')
        p = nextprime(p)

A360285 Triangle read by rows: T(n,k) is the number of subsets of {1,...,n} of cardinality k in which no two elements are coprime; n >= 0, 0 <= k <= floor(n/2) + [n=1].

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 3, 1, 4, 1, 1, 5, 1, 1, 6, 4, 1, 1, 7, 4, 1, 1, 8, 7, 4, 1, 1, 9, 9, 5, 1, 1, 10, 14, 11, 5, 1, 1, 11, 14, 11, 5, 1, 1, 12, 21, 24, 16, 6, 1, 1, 13, 21, 24, 16, 6, 1, 1, 14, 28, 39, 36, 21, 7, 1, 1, 15, 34, 48, 41, 22, 7, 1, 1, 16, 41, 69, 76, 57, 28, 8, 1
Offset: 0

Author

Marcel K. Goh, Feb 01 2023

Keywords

Examples

			Triangle T(n,k) begins:
   n/k 0  1  2  3  4 5 6
   0   1
   1   1  1
   2   1  2
   3   1  3
   4   1  4  1
   5   1  5  1
   6   1  6  4  1
   7   1  7  4  1
   8   1  8  7  4  1
   9   1  9  9  5  1
  10   1 10 14 11  5 1
  11   1 11 14 11  5 1
  12   1 12 21 24 16 6 1
  ...
For n=8 and k=3 the T(8,3)=4 sets are {2,4,6}, {2,4,8}, {2,6,8}, and {4,6,8}.
		

Crossrefs