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.

Previous Showing 21-26 of 26 results.

A251091 a(n) = n^2 / gcd(n+2, 4).

Original entry on oeis.org

0, 1, 1, 9, 8, 25, 9, 49, 32, 81, 25, 121, 72, 169, 49, 225, 128, 289, 81, 361, 200, 441, 121, 529, 288, 625, 169, 729, 392, 841, 225, 961, 512, 1089, 289, 1225, 648, 1369, 361, 1521, 800, 1681, 441, 1849, 968, 2025, 529, 2209, 1152, 2401, 625, 2601, 1352
Offset: 0

Views

Author

Paul Curtz, May 08 2015

Keywords

Comments

A061038(n), which appears in 4*a(n) formula, is a permutation of n^2.
Origin. In December 2010, I wrote in my 192-page Exercise Book no. 5, page 41, the array (difference table of the first row):
1 0, 1/3, 1, 9/5, 8/3, 25/7, 9/2, 49/9, ...
-1, 1/3, 2/3, 4/5, 13/15, 19/21, 13/14, 17/18, 43/45, ...
Numerators are listed in A176126, denominators are in A064038, and denominator - numerator = 2, 2, 1, 1,... (A014695).
4/3, 1/3, 2/15, 1/15, 4/105, 1/42, 1/63, 1/90, 4/495, ...
-1, -1/5, -1/15, -1/35, -1/70, -1/126, -1/210, -1/330, -1/495, ...
where the denominators of the second row are listed in A000332.
Also for those of the inverse binomial transform
1, -1, 4/3, -1, 4/5, -2/3, 4/7, -1/2, 4/9, -2/5, 4/11, -1/3, ... ?
a(n) is the (n+1)-th term of the numerators of the first row.

Examples

			a(0) = 0/2, a(1) = 1/1, a(2) = 4/4, a(3) = 9/1.
		

Crossrefs

Programs

  • Magma
    [(1-(1/16)*(1+(-1)^n)*(5-(-1)^(n div 2)) )*n^2: n in [0..60]]; // Vincenzo Librandi, Jun 12 2015
  • Maple
    seq(seq((4*i+j-1)^2/[2,1,4,1][j],j=1..4),i=0..30); # Robert Israel, May 14 2015
  • Mathematica
    f[n_] := Switch[ Mod[n, 4], 0, n^2/2, 1, n^2, 2, n^2/4, 3, n^2]; Array[f, 50, 0] (* or *) Table[(4 i + j - 1)^2/{2, 1, 4, 1}[[j]], {i, 0, 12}, {j, 4}] // Flatten (* after Robert Israel *) (* or *) LinearRecurrence[{0, 0, 0, 3, 0, 0, 0, -3, 0, 0, 0, 1}, {0, 1, 1, 9, 8, 25, 9, 49, 32, 81, 25, 121}, 53] (* or *) CoefficientList[ Series[-((x (1 + x (1 + x (9 + x (8 + x (22 + x (6 + x (22 + x (8 + x (9 + x + x^2))))))))))/(-1 + x^4)^3), {x, 0, 52}], x] (* Robert G. Wilson v, May 19 2015 *)
  • PARI
    concat(0, Vec(-x*(x^10 + x^9 + 9*x^8 + 8*x^7 + 22*x^6 + 6*x^5 + 22*x^4 + 8*x^3 + 9*x^2 + x + 1) / ((x-1)^3*(x+1)^3*(x^2+1)^3) + O(x^100))) \\ Colin Barker, May 14 2015
    

Formula

a(n) = n^2/(period 4: repeat 2, 1, 4, 1).
a(4n) = 8*n^2, a(2n+1) = a(4n+2) = (2*n+1)^2.
a(n+4) = a(n) + 8*A060819(n).
a(n) = 3*a(n-4) - 3*a(n-8) + a(n-12), n>11.
4*a(n) = (period 4: repeat 2, 1, 4, 1) * A061038(n).
G.f.: -x*(x^10+x^9+9*x^8+8*x^7+22*x^6+6*x^5+22*x^4+8*x^3+9*x^2+x+1) / ((x-1)^3*(x+1)^3*(x^2+1)^3). - Colin Barker, May 14 2015
a(2n) = A181900(n), a(2n+1) = A016754(n). [Bruno Berselli, May 14 2015]
a(n) = ( 1 - (1/16)*(1+(-1)^n)*(5-(-1)^(n/2)) )*n^2. - Bruno Berselli, May 14 2015
Sum_{n>=1} 1/a(n) = 13*Pi^2/48. - Amiram Eldar, Aug 12 2022

Extensions

Missing term (1521) inserted in the sequence by Colin Barker, May 14 2015
Definition uses a formula by Jean-François Alcover, Jul 01 2015
Keyword:mult added by Andrew Howroyd, Aug 06 2018

A257942 a(n) = (n+1)*(n+2)/A014695(n+1), where A014695 is repeat (1, 2, 2, 1).

Original entry on oeis.org

1, 3, 12, 20, 15, 21, 56, 72, 45, 55, 132, 156, 91, 105, 240, 272, 153, 171, 380, 420, 231, 253, 552, 600, 325, 351, 756, 812, 435, 465, 992, 1056, 561, 595, 1260, 1332, 703, 741, 1560, 1640, 861, 903, 1892, 1980, 1035, 1081, 2256, 2352, 1225, 1275, 2652
Offset: 0

Views

Author

Paul Curtz, Jul 14 2015

Keywords

Comments

Consider, for n >= 0, a sequence s(n). A useful transform is wi(n) = s(0), s(2), s(3), ..., i.e., s(n) without s(1).
For s(n) = 1/(n+1), wi(n)= 1, 1/3, 1/4, 1/5, ..., whose inverse binomial transform is f(n) = 1, -2/3, 7/12, -11/20, 8/15, -11/21, 29/56, -37/72, 23/45, -28/55, 67/132, -79/156, 46/91, -53/105, 121/240, -137/272, ...
The denominator of f(n) is a(n), for n >= 0.
If the numerator of f(n) is b(n), then it can be seen that b(n+1) = -(-1)^n* A226089(n).
Alternating a(n) - b(n) with a(n) + b(n) yields 0, 1, 5, 9, ... = A160050(n+1).
a(4n+1) is linked to the Rydberg-Ritz spectra of hydrogen.
h(n) = 0, 0, 1, 1, 4, 4, 3, 3, 8, 8, 5, 5, ... = duplicated A022998(n).
A022998(n) is linked to the Balmer series (see A246943(n)).
With an initial 0 and offset=0, a(-n) = a(n). Then (a(n+10) - a(n-10))/10 = 1, 6, 10, 7, 9, 22, 26, ... = g(n). a(n) mod 9 is of period 20.

Crossrefs

Cf. A002378(n+1), A014695(n+1)=A130658(n+2), A014634, A033567(n+1), A104188(n+1), 4*A007742(n+1), A160050 (in A226089), A022998, A109613, A000217(n+1), A246943.

Programs

  • Maple
    A257942:=n->(n+1)*(n+2)/(3/2+(-1)^((2*n+7+(-1)^n)/4)/2): seq(A257942(n), n=0..100); # Wesley Ivan Hurt, Jul 18 2015
  • Mathematica
    CoefficientList[Series[-(x^6 + 9 x^4 - 8 x^3 + 9 x^2 + 1)/((x - 1)^3 (x^2 + 1)^3), {x, 0, 50}], x] (* Michael De Vlieger, Jul 14 2015 *)
    (* Using inverse binomial transform *) s[0]=1; s[n_] := 1/(n+2); f[n_] := Sum[(-1)^(n-k)*Binomial[n, k]*s[k], {k, 0, n}]; Table[f[n]//Denominator, {n, 0, 50}] (* Jean-François Alcover, Jul 14 2015 *)
    LinearRecurrence[{3, -6, 10, -12, 12, -10, 6, -3, 1}, {1, 3, 12, 20, 15, 21, 56, 72, 45}, 55] (* Vincenzo Librandi, Jul 15 2015 *)
  • PARI
    Vec(-(x^6+9*x^4-8*x^3+9*x^2+1)/((x-1)^3*(x^2+1)^3) + O(x^100)) \\ Colin Barker, Jul 14 2015
    
  • PARI
    a(n)=(n+1)*(n+2)/if(n%4<2,2,1) \\ Charles R Greathouse IV, Jul 14 2015

Formula

a(4n) = (2*n+1)*(4*n+1).
a(4n+1) = (2*n+1)*(4*n+3).
a(4n+2) = (4*n+3)*(4*n+4).
a(4n+3) = (4*n+4)*(4*n+5).
a(n) = A064038(n+2) * (period 4: repeat 1, 1, 4, 4).
From Colin Barker, Jul 14 2015: (Start)
a(n) = (-1/8+i/8)*(((-3-i*3)+i*(-i)^n+i^n)*(2+3*n+n^2)) where i=sqrt(-1).
G.f.: -(x^6+9*x^4-8*x^3+9*x^2+1) / ((x-1)^3*(x^2+1)^3). (End)
a(n) = h(n+2) * A109613(n+1).
a(n) = (n+1)*(n+2) * period 4:repeat (1, 1, 2, 2) /2.
From Wesley Ivan Hurt, Jul 18 2015: (Start)
a(n) = (n+1)*(n+2)/(3/2+(-1)^((2*n+7+(-1)^n)/4)/2).
a(n) = 3*a(n-1)-6*a(n-2)+10*a(n-3)-12*a(n-4)+12*a(n-5)-10*a(n-6)+6*a(n-7)-3*a(n-8)+a(n-9), n>9. (End)
Sum_{n>=0} 1/a(n) = Pi/4 + 1. - Amiram Eldar, Aug 14 2022

A371478 Numbers k for which k swaps are needed to bubble-sort the US English number name of k.

Original entry on oeis.org

2, 17, 21, 25
Offset: 1

Views

Author

Eric Angelini and Nicolas Graner, Mar 25 2024

Keywords

Comments

No swaps involve hyphens or spaces.
Only four such numbers < 100 have this property: are there more?
In French, only three such numbers are known: 1, 14, 23.
For number names up to one million, the number of swaps does not exceed 712. - Hans Havermann, Mar 25 2024
There are no more terms. Computationally, there are none < 10^9. If the name of n has k letters, a(n) <= k*(k-1)/2 from the properties of bubble sort. Also, if 1000^(e-1) <= n < 1000^e, then k <= 41*e, where the loose upper bound comes from "threehundredseventythree" and "quattuordecillion" considering all terms up to 10^66 using English names of large numbers (see Wikipedia link). Thus, a(n) <= 820*e^2 <= 1000^(e-1) for e >= 3. Similar bounds can be derived for extended naming schemes. - Michael S. Branicky, Mar 26 2024

Examples

			2 is a term since "two" requires 2 swaps of adjacent letters to sort into ascending alphabetical order: TWO -> TOW -> OTW.
		

Crossrefs

A165983 Period 16: repeat 1,1,1,2,1,1,1,2,1,1,1,4,1,1,1,4.

Original entry on oeis.org

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

Views

Author

Paul Curtz, Oct 03 2009

Keywords

Comments

The numerator of the reduced fraction A061037(n+3)/A061041(2n+6).

Crossrefs

Cf. A064038.

Programs

  • Magma
    m:=50; R:=PowerSeriesRing(Integers(), m); Coefficients(R!(( -1-x-x^2-2*x^3-x^8-x^9-x^10-4*x^11 )/((x-1)*(1+x)*(1+x^2)*(x^8+1)))); // G. C. Greubel, Sep 20 2018
  • Mathematica
    LinearRecurrence[{0, 0, 0, 1, 0, 0, 0, -1, 0, 0, 0, 1}, {1, 1, 1, 2,  1, 1, 1, 2, 1, 1, 1, 4}, 50] (* G. C. Greubel, Apr 20 2016 *)
  • PARI
    x='x+O('x^50); Vec(( -1-x-x^2-2*x^3-x^8-x^9-x^10-4*x^11 )/((x-1)*(1+x)*(1+x^2)*(x^8+1))) \\ G. C. Greubel, Sep 20 2018
    

Formula

a(n) = a(n-4) - a(n-8) + a(n-12). - R. J. Mathar, Dec 17 2010
G.f.: ( -1 - x - x^2 - 2*x^3 - x^8 - x^9 - x^10 - 4*x^11 ) / ( (x-1)*(1+x)*(1+x^2)*(x^8+1) ). - R. J. Mathar, Dec 17 2010
a(4n) = a(4n+1) = a(4n+2) = 1. a(4n+3) = A165207(n).

A222740 Denominators of 1/16 - 1/(4 + 8*n)^2.

Original entry on oeis.org

1, 18, 50, 49, 81, 242, 338, 225, 289, 722, 882, 529, 625, 1458, 1682, 961, 1089, 2450, 2738, 1521, 1681, 3698, 4050, 2209, 2401, 5202, 5618, 3025, 3249, 6962, 7442, 3969, 4225, 8978, 9522, 5041, 5329, 11250, 11858, 6241
Offset: 0

Views

Author

Paul Curtz, May 29 2013

Keywords

Comments

Denominators of the reduced fractions A064038(n)/a(n) = 0/1, 1/18, 3/50, 3/49, 5/81, 15/242, 21/338, 14/225, 18/289, ... .
Also, A064038 and a(n) are related to the sequence of period 4: repeat 1, 2, 2, 1.

Examples

			a(0) = 1*1, a(1) = 2*9 = 18, a(2) = 2*25 = 50, a(3) = 1*49 = 49.
a(0) = 16*0 + 1 = 1, a(1) = 16*1 + 2 = 18, a(2) = 16*3 + 2 = 50, a(3) = 16*3 + 1 = 49.
		

Programs

  • Mathematica
    Table[1/16-1/(4+8n)^2,{n,0,40}]//Denominator (* or *) LinearRecurrence[ {3,-6,10,-12,12,-10,6,-3,1},{1,18,50,49,81,242,338,225,289},40] (* Harvey P. Dale, Aug 30 2021 *)

Formula

a(n) = A014695(n) * A016754(n).
a(n) = 16*A064038(n+1) + A014695(n).
a(n) = A061042(4+8*n).
a(2n+2) - a(2n+1) = 32*A026741(n+1).
G.f.: ( -1 - 15*x - 2*x^2 + 3*x^3 - 66*x^4 + 3*x^5 - 2*x^6 - 15*x^7 - x^8 ) / ( (x-1)^3*(x^2+1)^3 ). - R. J. Mathar, Jun 04 2013
a(n) = (3-sqrt(2)*cos((2*n+1)*Pi/4))*(2*n+1)^2/2. - Wesley Ivan Hurt, Oct 04 2018

A306764 a(n) is a sequence of period 12: repeat [1, 1, 6, 2, 1, 3, 2, 2, 3, 1, 2, 6].

Original entry on oeis.org

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

Views

Author

Paul Curtz, Mar 08 2019

Keywords

Comments

a(1) to a(12) is a palindrome.
A089145(n) = A089128(n+3).
A089128(n) = A089145(n+3).
a(1) + a(2) + a(3) + a(4) = a(5) + a(6) + a(7) + a(8) = a(9) + a(10) + a(11) + a(12) = 10.

Examples

			a(0) =  6/6  = 1;
a(1) = 10/10 = 1;
a(2) = 30/5  = 6;
a(3) = 42/21 = 2.
		

Crossrefs

Cf. A064038, A089128 and A089145 (shifted bisections), A306368, A010692.

Programs

  • Mathematica
    PadRight[{},120,{1,1,6,2,1,3,2,2,3,1,2,6}] (* or *) LinearRecurrence[ {0,0,1,0,0,-1,0,0,1},{1,1,6,2,1,3,2,2,3},120] (* Harvey P. Dale, Dec 16 2021 *)
  • PARI
    Vec((1 + x + 6*x^2 + x^3 - 3*x^5 + x^6 + 2*x^7 + 6*x^8) / ((1 - x)*(1 + x^2)*(1 + x + x^2)*(1 - x^2 + x^4)) + O(x^80)) \\ Colin Barker, Dec 11 2019

Formula

a(n) = 2*A064038(n+3)/A306368(n).
a(n) = interleave A089128(n-1), A089128(n+1).
a(n) = interleave A089145(n+2), A089145(n-2).
From Colin Barker, Dec 09 2019: (Start)
G.f.: (1 + x + 6*x^2 + x^3 - 3*x^5 + x^6 + 2*x^7 + 6*x^8) / ((1 - x)*(1 + x^2)*(1 + x + x^2)*(1 - x^2 + x^4)).
a(n) = a(n-3) - a(n-6) + a(n-9) for n>8.
(End)
Previous Showing 21-26 of 26 results.