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: Yuriy Sibirmovsky

Yuriy Sibirmovsky's wiki page.

Yuriy Sibirmovsky has authored 15 sequences. Here are the ten most recent ones:

A282497 'Somos expansion' of e: e=a(0)*sqrt(a(1)*sqrt(a(2)*sqrt(a(3)*sqrt(...)))). a(n)=floor(x(n)), x(n)=x(n-1)^2/a(n-1)^2, x(0)=e.

Original entry on oeis.org

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

Author

Yuriy Sibirmovsky, Feb 16 2017

Keywords

Comments

1<=a(n)<=3 for all n. Reasoning: for x>1 it follows that 1

Examples

			Integer part of e is 2. Integer part of e^2/4 is 1.
		

Crossrefs

Cf. A001113 (digits).

Programs

  • Mathematica
    $MaxExtraPrecision = 1000;
    x0 = E;
    Nm = 130;
    j = 1;
    Res = Table[1, {j, 1, Nm}];
    While[j < Nm, Res[[j]] = Floor[x0]; x0 = N[(x0/ Res[[j]])^2, 20000];
      j++];

Formula

Product_{k>=0} a(k)^(1/2^k) = e.

A282496 'Somos expansion' of Pi: Pi=a(0)*sqrt(a(1)*sqrt(a(2)*sqrt(a(3)*sqrt(...)))). a(n)=floor(x(n)), x(n)=x(n-1)^2/a(n-1)^2, x(0)=Pi.

Original entry on oeis.org

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

Author

Yuriy Sibirmovsky, Feb 16 2017

Keywords

Comments

1<=a(n)<=3 for all n. Reasoning: for x>1 it follows that 1

Examples

			Integer part of Pi is 3. Integer part of Pi^2/9 is 1.
		

Crossrefs

Cf. A000796 (digits), A100044 (Pi^2/9), A001203 (continued fraction), A276459 (another nested radical expansion).

Programs

  • Mathematica
    $MaxExtraPrecision = 1000;
    x00 = Pi;
    x0 = x00;
    Nm = 130;
    j = 1;
    Res = Table[1, {j, 1, Nm}];
    While[j < Nm, Res[[j]] = Floor[x0]; x0 = N[(x0/ Res[[j]])^2, 20000];
      j++];
    Res

Formula

Product_{k>=0} a(k)^(1/2^k) = Pi.

A281873 a(n+1) is the smallest number greater than a(n) such that Sum_{j=1..n+1} 1/a(j) <= 4, a(1) = 1.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 200, 77706, 16532869712, 3230579689970657935732, 36802906522516375115639735990520502954652700
Offset: 1

Author

Yuriy Sibirmovsky, Jan 31 2017

Keywords

Comments

The method for any number A is to find the largest harmonic number H(n) smaller than A, then use the greedy algorithm to expand the difference A - H(n).
A140335 is the same sequence for 3. The sequence for 5 consists of 99 terms, the largest of which has 142548 digits.

References

  • A. M. Gleason, R. E. Greenwood, and L. M. Kelly, The William Lowell Putnam Mathematical Competition, Problems and Solutions, 1938-1964, MAA, 1980, pages 398-399.

Crossrefs

Programs

  • Mathematica
    x0=4-Sum[1/k,{k,1,30}];
    Nm=10;
    j=0;
    While[x0>0||j==Nm,a0=Ceiling[1/x0];
    x0=x0-1/a0;
    Print[a0];j++]
    f[s_List, n_] := Block[{t = Total[1/s]}, Append[s, Max[ s[[-1]] +1, Ceiling[1/(n - t)]]]]; Nest[f[#, 4] &, {1}, 34] (* Robert G. Wilson v, Feb 05 2017 *)
  • Python
    from sympy import egyptian_fraction
    print(egyptian_fraction((4, 1))) # Pontus von Brömssen, Feb 10 2019

Formula

Sum_{k=1..35} 1/a(k) = 4.

A278288 a(n) is the number of ways to represent a(n-1) as a sum of two distinct terms from a(0) to a(n-2). a(0) = 0. a(1) = a(2) = 1.

Original entry on oeis.org

0, 1, 1, 1, 2, 3, 3, 4, 6, 2, 4, 8, 3, 8, 4, 12, 6, 10, 10, 11, 12, 15, 9, 12, 19, 7, 15, 17, 10, 18, 22, 17, 12, 22, 21, 22, 25, 25, 26, 22, 26, 26, 27, 32, 25, 30, 27, 35, 21, 23, 31, 31, 32, 37, 37, 38, 37, 39, 37, 40, 40, 41, 45, 28, 37, 42, 38, 50, 33, 43, 58, 34
Offset: 0

Author

Yuriy Sibirmovsky, Nov 16 2016

Keywords

Comments

a(n) is the number of pairs (j, k) such that a(j) + a(k) = a(n-1), with 0 <= j, k < n-1 and j != k.
For large n, a(n) on average follows linear law a(n) ~ 0.7 n with linear spread (see the plot).
Unlike sequences such as A248034 or A276457, this sequence is base-independent.

Examples

			a(2) = a(1) + a(0), so a(3) = 1.
a(3) = a(1) + a(0) = a(2) + a(0), so a(4) = 2.
a(4) = a(3) + a(2) = a(3) + a(1) = a(2) + a(1), so a(5) = 3.
		

Crossrefs

Programs

  • Mathematica
    Nm=100;
    A=Table[1,{n,1,Nm}];
    A[[1]]=0;
    Do[Nc=0;
    Do[If[A[[j]]+A[[k]]==A[[n]] && k!=j,Nc++],{j,1,n-1},{k,1,j}];
    A[[n+1]]=Nc,{n,3,Nm-1}];
    A

A276819 a(n) = (9*n^2 - n)/2 + 1.

Original entry on oeis.org

1, 5, 18, 40, 71, 111, 160, 218, 285, 361, 446, 540, 643, 755, 876, 1006, 1145, 1293, 1450, 1616, 1791, 1975, 2168, 2370, 2581, 2801, 3030, 3268, 3515, 3771, 4036, 4310, 4593, 4885, 5186, 5496, 5815, 6143, 6480, 6826, 7181, 7545, 7918, 8300, 8691, 9091, 9500, 9918, 10345, 10781, 11226, 11680, 12143, 12615
Offset: 0

Author

Yuriy Sibirmovsky, Sep 18 2016

Keywords

Comments

Diagonal of triangular spiral in A051682. The other 5 diagonals are given by A140064, A117625, A081267, A064225, A006137. See the link as well.
First differences are given by A017209.
72*a(n) - 71 is a perfect square. - Klaus Purath, Jan 14 2022

Programs

  • Mathematica
    Table[(9*n^2-n)/2+1, {n,0,100}]
  • PARI
    Vec((1+2*x+6*x^2)/(1-x)^3 + O(x^60)) \\ Colin Barker, Sep 18 2016
    
  • PARI
    a(n) = (9*n^2 - n)/2 + 1; \\ Altug Alkan, Sep 18 2016

Formula

a(n) = (9*n^2 - n)/2 + 1.
a(n) = a(n-1) + 9*n - 5 with a(0) = 1.
From Colin Barker, Sep 18 2016: (Start)
a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3) for n > 2.
G.f.: (1 + 2*x + 6*x^2)/(1 - x)^3. (End)
From Klaus Purath, Jan 14 2022: (Start)
a(n) = A006137(n) - n.
A003215(a(n)) - A003215(a(n)-3) = A002378(9*n-1). (End)
E.g.f.: exp(x)*(2 + 8*x + 9*x^2)/2. - Stefano Spezia, Dec 25 2022

A276806 Height of the shortest binary factorization tree of n.

Original entry on oeis.org

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

Author

Yuriy Sibirmovsky, Sep 17 2016

Keywords

Comments

Among all possible binary factorization trees of n we choose a tree with minimal height. The choice may not be unique. a(n) gives the height of the chosen tree.
To compute the terms A001222 and A001221 could be used.
The positions at which numbers (1,2,3) first appear are respectively (4,8,32). The latter sequence can be described by the formula b(n) = 2^(2^(n-1) + 1).

Examples

			a(12) = 2 since 12 cannot be factored in a binary factorization tree of height less than 2, but it can be factored in a tree of height 2, e.g.,
      12
      / \
     4   3
    / \
   2   2
Similarly, a(16) = 2:
       16
       / \
      /   \
     4     4
    / \   / \
   2   2 2   2
and a(40) = 2:
       40
       / \
      /   \
     4    10
    / \   / \
   2   2 2   5
and a(84) = 2:
       84
       / \
      /   \
     4    21
    / \   / \
   2   2 3   7
		

Crossrefs

Programs

  • PARI
    a(n)=if(n>1,my(b=bigomega(n),c=(2^logint(b,2)!=b));logint(b,2)+c,0) \\ David A. Corneth, Oct 01 2016
    
  • PARI
    A276806(n) = { my(m=0,h); if((1==n)||isprime(n),0,fordiv(n,d,if((d>1)&&(dA276806(d),A276806(n/d)); if(!m || (h < m),m=h)))); m; }; \\ Antti Karttunen, Aug 12 2017

Formula

a(n^2) = a(n) + 1.

A276771 a(n) is the number of runs of an algorithm. Set b_0 = n, if prime or 1 or 0, stop; else, set c_0 = largest divisor of n (!=n); set b_1 = c_0 - b_0/c_0. Run with b_1.

Original entry on oeis.org

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

Author

Yuriy Sibirmovsky, Sep 17 2016

Keywords

Comments

For large n: Sum_{k=1..n} a(k) ~ n*log(n)/2 - n/2 (conjectured).

Examples

			For n=14: b_0 = 14, not prime or 1 or 0. c_0 = 7. b_1 = 7 - 2 = 5. 5 is prime.
In short: 14 -> {7,2} -> 5. Number of runs a(14) = 1.
		

Crossrefs

Programs

  • Mathematica
    Nm=100;
    a=Table[0,{n,1,Nm}];
    Do[b0=n;
    j=0;
    While[PrimeQ[b0]==False&&b0!=1&&b0!=0,c=Reverse[Divisors[b0]];
    b1=c[[2]]-b0/c[[2]];
    b0=b1;j++];
    a[[n]]=j,{n,1,Nm}];
    a
  • PARI
    stop(n) = (n<=1) || isprime(n);
    a(n) = {b = n; nb = 0; while (! stop(b), d = divisors(b); c = d[#d-1]; b = c - b/c; nb++;); nb;} \\ Michel Marcus, Sep 19 2016

A276770 a(n) is the number of runs of an algorithm. Set b_0 = n, if prime, stop; else, set c_0 = largest divisor of n (!=n); set b_1 = c_0 + b_0/c_0. Run with b_1.

Original entry on oeis.org

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

Author

Yuriy Sibirmovsky, Sep 17 2016

Keywords

Comments

a(4) -> infinity. For any other n >= 2, a(n) is finite, however cases n = 2,3 are trivial, so the offset is 5.
For large n: Sum_{k=5..n} a(k) ~ n*log(n)/2 (conjectured).

Examples

			For n=14: b_0 = 14, not prime. c_0 = 7. b_1 = 7 + 2 = 9. 9 is not prime.
In short: 14 -> {7,2} -> 9 -> {3,3} -> 6 -> {3,2} -> 5. Number of runs a(14) = 3.
		

Crossrefs

Programs

  • Mathematica
    Nm=100;
    a=Table[0,{n,1,Nm}];
    Do[b0=n;
    j=0;
    While[PrimeQ[b0]==False,c=Reverse[Divisors[b0]];
    b1=c[[2]]+b0/c[[2]];
    b0=b1;j++];
    a[[n]]=j,{n,5,Nm}];
    Table[a[[k]],{k,5,Nm}]
  • PARI
    stop(n) = (n<=1) || isprime(n);
    a(n) = {b = n; nb = 0; while (! stop(b), d = divisors(b); c = d[#d-1]; b = c + b/c; nb++;); nb;} \\ Michel Marcus, Sep 19 2016

A276648 Number of points of norm <= n in the body-centered cubic lattice with the lattice parameter equal to 2/sqrt(3).

Original entry on oeis.org

1, 9, 59, 169, 339, 701, 1243, 1893, 2741, 3943, 5577, 7343, 9409, 12039, 15065, 18421, 22227, 26717, 31879, 37461, 43655, 50557, 58071, 66227, 75121, 85083, 95801, 107227, 119541, 133019, 147271, 161901, 178127, 195481, 214143
Offset: 0

Author

Yuriy Sibirmovsky, Sep 11 2016

Keywords

Comments

Experimentally observed dense bcc clusters of gold contain 1, 9, 59, 169, 339, 701 and 1243 nanoparticles (N.G. Khlebtsov, Fig. 32 and text on p. 208), exactly matching the first 7 terms of the sequence.
First 5 terms are the same as A276450.

Examples

			The origin has norm 0, thus a(0)=1. The distance to the 8 vertices of the cube from the origin is 1, because the edge of the cube is 2/sqrt(3). Thus a(1)=9.
		

Crossrefs

Cf. A276450.

Programs

  • Mathematica
    DecM[A_]:=A[[1]]^2+A[[2]]^2+A[[3]]^2;
    Do[N1=0;N2=0;
    Do[A={l,k,j};
    B={l+1/2,k+1/2,j+1/2};
    If[DecM[A]<=3/4r^2,N1+=1];
    If[DecM[B]<=3/4r^2,N2+=1],{l,-r-1,r+1},{k,-r-1,r+1},{j,-r-1,r+1}];
    Print[r," ",N1+N2],{r,0,20}]

A276472 Modified Pascal's triangle read by rows: T(n,k) = T(n-1,k) + T(n-1,k-1), 12. T(n,n) = T(n,n-1) + T(n-1,n-1), n>1. T(1,1) = 1, T(2,1) = 1. n>=1.

Original entry on oeis.org

1, 1, 2, 4, 3, 5, 11, 7, 8, 13, 29, 18, 15, 21, 34, 76, 47, 33, 36, 55, 89, 199, 123, 80, 69, 91, 144, 233, 521, 322, 203, 149, 160, 235, 377, 610, 1364, 843, 525, 352, 309, 395, 612, 987, 1597, 3571, 2207, 1368, 877, 661, 704, 1007, 1599, 2584, 4181
Offset: 1

Author

Yuriy Sibirmovsky, Sep 12 2016

Keywords

Comments

The recurrence relations for the border terms are the only way in which this differs from Pascal's triangle.
Column T(2n,n+1) appears to be divisible by 4 for n>=2; T(2n-1,n) divisible by 3 for n>=2; T(2n,n-2) divisible by 2 for n>=3.
The symmetry of T(n,k) can be observed in a hexagonal arrangement (see the links).
Consider T(n,k) mod 3 = q. Terms with q = 0 show reflection symmetry with respect to the central column T(2n-1,n), while q = 1 and q = 2 are mirror images of each other (see the link).

Examples

			Triangle T(n,k) begins:
n\k 1    2    3    4   5    6    7    8    9
1   1
2   1    2
3   4    3    5
4   11   7    8    13
5   29   18   15   21   34
6   76   47   33   36   55   89
7   199  123  80   69   91   144 233
8   521  322  203  149  160  235 377  610
9   1364 843  525  352  309  395 612  987  1597
...
In another format:
__________________1__________________
_______________1_____2_______________
____________4_____3_____5____________
________11_____7_____8_____13________
____29_____18_____15____21_____34____
_76_____47____33_____36____55_____89_
		

Programs

  • Mathematica
    Nm=12;
    T=Table[0,{n,1,Nm},{k,1,n}];
    T[[1,1]]=1;
    T[[2,1]]=1;
    T[[2,2]]=2;
    Do[T[[n,1]]=T[[n-1,1]]+T[[n,2]];
    T[[n,n]]=T[[n-1,n-1]]+T[[n,n-1]];
    If[k!=1&&k!=n,T[[n,k]]=T[[n-1,k]]+T[[n-1,k-1]]],{n,3,Nm},{k,1,n}];
    {Row[#,"\t"]}&/@T//Grid
  • PARI
    T(n,k) = if (k==1, if (n==1, 1, if (n==2, 1, T(n-1,1) + T(n,2))), if (kMichel Marcus, Sep 14 2016

Formula

Conjectures:
Relations with other sequences:
T(n+1,1) = A002878(n-1), n>=1.
T(n,n) = A001519(n) = A122367(n-1), n>=1.
T(n+1,2) = A005248(n-1), n>=1.
T(n+1,n) = A001906(n) = A088305(n), n>=1.
T(2n-1,n) = 3*A054441(n-1), n>=2. [the central column].
Sum_{k=1..n} T(n,k) = 3*A105693(n-1), n>=2. [row sums].
Sum_{k=1..n} T(n,k)-T(n,1)-T(n,n) = 3*A258109(n), n>=2.
T(2n,n+1) - T(2n,n) = A026671(n), n>=1.
T(2n,n-1) - T(2n,n) = 2*A026726(n-1), n>=2.
T(n,ceiling(n/2)) - T(n-1,floor(n/2)) = 2*A026732(n-3), n>=3.
T(2n+1,2n) = 3*A004187(n), n>=1.
T(2n+1,2) = 3*A049685(n-1), n>=1.
T(2n+1,2n) + T(2n+1,2) = 3*A033891(n-1), n>=1.
T(2n+1,3) = 5*A206351(n), n>=1.
T(2n+1,2n)/3 - T(2n+1,3)/5 = 4*A092521(n-1), n>=2.
T(2n,1) = 1 + 5*A081018(n-1), n>=1.
T(2n,2) = 2 + 5*A049684(n-1), n>=1.
T(2n+1,2) = 3 + 5*A058038(n-1), n>=1.
T(2n,3) = 3 + 5*A081016(n-2), n>=2.
T(2n+1,1) = 4 + 5*A003482(n-1), n>=1.
T(3n,1) = 4*A049629(n-1), n>=1.
T(3n,1) = 4 + 8*A119032(n), n>=1.
T(3n+1,3) = 8*A133273(n), n>=1.
T(3n+2,3n+2) = 2 + 32*A049664(n), n>=1.
T(3n,3n-2) = 4 + 32*A049664(n-1), n>=1.
T(3n+2,2) = 2 + 16*A049683(n), n>=1.
T(3n+2,2) = 2*A023039(n), n>=1.
T(2n-1,2n-1) = A033889(n-1), n>=1.
T(3n-1,3n-1) = 2*A007805(n-1), n>=1.
T(5n-1,1) = 11*A097842(n-1), n>=1.
T(4n+5,3) - T(4n+1,3) = 15*A000045(8n+1), n>=1.
T(5n+4,3) - T(5n-1,3) = 11*A000204(10n-2), n>=1.
Relations between left and right sides:
T(n,1) = T(n,n) - T(n-2,n-2), n>=3.
T(n,2) = T(n,n-1) - T(n-2,n-3), n>=4.
T(n,1) + T(n,n) = 3*T(n,n-1), n>=2.