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.

Showing 1-8 of 8 results.

A113127 Expansion of (1 + x + x^2 + x^3)/(1-x)^2.

Original entry on oeis.org

1, 3, 6, 10, 14, 18, 22, 26, 30, 34, 38, 42, 46, 50, 54, 58, 62, 66, 70, 74, 78, 82, 86, 90, 94, 98, 102, 106, 110, 114, 118, 122, 126, 130, 134, 138, 142, 146, 150, 154, 158, 162, 166, 170, 174, 178, 182, 186, 190, 194, 198, 202, 206, 210, 214, 218, 222, 226, 230
Offset: 0

Views

Author

Paul Barry, Oct 14 2005

Keywords

Comments

Row sums of number triangle A113126.
Equals binomial transform of [1, 2, 1, 0, -1, 2, -3, 4, -5, ...]. - Gary W. Adamson, Feb 14 2009
From 6 on the same as A016825. - R. J. Mathar, Jul 21 2013
The size of a maximal 4-degenerate graph of order n-2 (this class includes 4-trees). - Allan Bickle, Nov 14 2021
Maximum size of an apex graph of order n-2 (an apex graph can be made planar by deleting a single vertex). - Allan Bickle, Nov 14 2021

Crossrefs

a(n) - a(n-1) = A158411(n+1). - Jaume Oliver Lafont, Mar 27 2009

Programs

  • Magma
    [4*n-2+2*Binomial(0, n)+Binomial(1, n): n in [0..80]]; // Vincenzo Librandi, Nov 03 2018
  • Mathematica
    CoefficientList[Series[(1 + x + x^2 + x^3) / (1 - x)^2, {x, 0, 100}], x] (* Vincenzo Librandi, Nov 03 2018 *)
    LinearRecurrence[{2,-1},{1,3,6,10},60] (* Harvey P. Dale, Jul 08 2019 *)
  • PARI
    x='x+O('x^66); Vec((1+x+x^2+x^3)/(1-x)^2) \\ Joerg Arndt, May 06 2013
    

Formula

a(n) = 4*n - 2 + 2*binomial(0, n) + binomial(1, n);
a(n) = binomial(n+1, n) + binomial(n, n-1) + binomial(n-1, n-2) + binomial(n-2, n-3).
Row sums of triangle A131034. - Gary W. Adamson, Jun 10 2007
G.f.: (x^2-1)/Q(0), where Q(k)= 4*x - 1 + x*k - x*(x-1)*(k+1)/Q(k+1); (continued fraction). - Sergei N. Gladkovskii, May 05 2013
a(n) = A111284(n+1) for n >= 2. - Georg Fischer, Nov 02 2018
a(n) = 4*(n+2) - 10 for n >= 2. - Allan Bickle, Nov 14 2021

A130824 a(n) = 2*A004273(n).

Original entry on oeis.org

0, 2, 6, 10, 14, 18, 22, 26, 30, 34, 38, 42, 46, 50, 54, 58, 62, 66, 70, 74, 78, 82, 86, 90, 94, 98, 102, 106, 110, 114, 118, 122, 126, 130, 134, 138, 142, 146, 150, 154, 158, 162, 166, 170, 174, 178, 182, 186, 190, 194, 198, 202, 206, 210, 214, 218, 222, 226, 230
Offset: 0

Views

Author

Paul Curtz, Jul 17 2007

Keywords

Comments

Equals A111284 from the 2nd term on. - R. J. Mathar, Jun 13 2008
Besides the first term, this sequence gives the denominators of the alternating series Pi/8 = 1/2 - 1/6 + 1/10 - 1/14 + 1/18 - 1/22 + .... - Mohammad K. Azarian, Oct 14 2011 [edited by Jon E. Schoenfield, Mar 07 2015]
Numbers that cannot be a side of a primitive Pythagorean triangle. - Torlach Rush, Nov 07 2019
Simple continued fraction expansion of tanh(1/2) = (e - 1)/(e + 1) = 1/(2 + 1/(6 + 1/(10 + 1/(14 + ...)))). - Peter Bala, Oct 01 2023

References

  • Granino A. Korn and Theresa M. Korn, Mathematical Handbook for Scientists and Engineers, McGraw-Hill Book Company, New York (1968).

Crossrefs

Programs

  • GAP
    Concatenation([0], List([1..60], n-> 4*n-2 )); # G. C. Greubel, Dec 30 2019
  • Magma
    [4*n-2*Floor((n+2) mod (n+1)):n in [0..60]]; // Vincenzo Librandi, Sep 22 2011
    
  • Maple
    A130827 := proc(n) if n =0 then 0 ; else 4*n-2 ; fi ; end: seq(A130827(n),n=0..120) ; # R. J. Mathar, Oct 28 2007
  • Mathematica
    2 Join[{0}, Range[1, 200, 2]] (* Michael De Vlieger, Mar 07 2015 *)
  • PARI
    vector(61, n, if(n==1, 0, 4*(n-1) -2) ) \\ G. C. Greubel, Dec 30 2019
    
  • Sage
    [0]+[4*n-2 for n in (1..60)] # G. C. Greubel, Dec 30 2019
    

Formula

From Stefano Spezia, Dec 09 2019: (Start)
G.f.: 2*x*(1+x)/(1-x)^2.
a(n) = 2*a(n-1) - a(n-2) for n > 0.
a(n) = 4*n - 1 - (-1)^(2^n). (End)
E.g.f: 2*(1 - (1-2*x)*exp(x)). - G. C. Greubel, Dec 30 2019

Extensions

More terms from R. J. Mathar, Oct 28 2007

A133653 A007318^(-1) * A003261.

Original entry on oeis.org

1, 6, 10, 14, 18, 22, 26, 30, 34, 38, 42, 46, 50, 54, 58, 62, 66, 70, 74, 78, 82, 86, 90, 94, 98, 102, 106, 110, 114, 118, 122, 126, 130, 134, 138, 142, 146, 150, 154
Offset: 1

Views

Author

Gary W. Adamson, Sep 19 2007

Keywords

Comments

It appears this sequence gives the positive integers m such that the sum of the first m Fibonacci numbers divides their product. For example, if n=2 and m=a(2)=6, we have the sum 1+1+2+3+5+8=20 which clearly divides the corresponding product 480. See A175553 for the analogous sequence when using the triangular numbers. Sum_{k=1..n} Fibonacci(k) divides Product_{k=1..n} Fibonacci(k). - John W. Layman, Jul 10 2010

Examples

			a(4) = 14 = (1, 3, 3, 1) dot (1, 5, -1, 1) = (1, 15, -3, 1).
		

Crossrefs

Essentially the same as A130824, A113127, A111284, A073760, A016825.

Formula

Inverse binomial transform of A003261: (1, 7, 23, 63, 159, 383, ...).
Binomial transform of [1, 5, -1, 1, -1, 1, ...].
"1" followed by 2 * [3, 5, 7, 9, 11, ...].
O.g.f.: x*(1+4x-x^2)/(1-x)^2. a(n) = 4n-2, n > 1. - R. J. Mathar, Jun 08 2008
1/(1+1/(6+1/(10+1/(14+1/(...(continued fraction)))))) = (e-1)/2 with e = 2.718281...- Philippe Deléham, Mar 09 2013

Extensions

More terms from R. J. Mathar, Jun 08 2008

A167666 Triangle read by rows given by [1,1,-4,2,0,0,0,0,0,0,0,...] DELTA [1,0,0,1,0,0,0,0,0,0,0,...] where DELTA is the operator defined in A084938.

Original entry on oeis.org

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

Views

Author

Philippe Deléham, Nov 08 2009

Keywords

Comments

Row sums = A111284(n+1), Diagonal sums = A109613(n).

Examples

			Triangle begins :
1 ;
1, 1 ;
2, 3, 1 ;
0, 4, 5, 1 ;
0, 0, 6, 7, 1 ;
0, 0, 0, 8, 9, 1 ;
0, 0, 0, 0, 10, 11, 1 ; ...
		

Crossrefs

Formula

T(n,k) = 2*T(n-1,k-1) - T(n-2,k-2), T(0,0) = T(1,0) = T(1,1) = 1, T(2,0) = 2, T(2,1) = 3, T(3,0) = 0, T(3,1) = 4. - Philippe Deléham, Feb 18 2012
G.f.: (1+(1-y)*x+(2+y)*x^2)/(1-y*x)^2. - Philippe Deléham, Feb 18 2012
Sum_{k, 0<=k<=n} T(n,k)*x^k = A000007(n), A130779(n), A111284(n+1), A167667(n), A167682(n) for x = -1, 0, 1, 2, 3 respectively. - Philippe Deléham, Feb 18 2012

A306264 a(n) = 1 + d*a(n/d); a(1)=0. If n has only one prime divisor, then d=n, otherwise d is the greatest proper unitary divisor of n.

Original entry on oeis.org

0, 1, 1, 1, 1, 4, 1, 1, 1, 6, 1, 5, 1, 8, 6, 1, 1, 10, 1, 6, 8, 12, 1, 9, 1, 14, 1, 8, 1, 16, 1, 1, 12, 18, 8, 10, 1, 20, 14, 9, 1, 22, 1, 12, 10, 24, 1, 17, 1, 26, 18, 14, 1, 28, 12, 9, 20, 30, 1, 21, 1, 32, 10, 1, 14, 34, 1, 18, 24, 36, 1, 10, 1, 38, 26, 20, 12, 40, 1, 17
Offset: 1

Views

Author

David James Sycamore, Feb 01 2019

Keywords

Comments

Name related to recursive formula of A006022.
a(n) = 1 if and only if n is a prime power; p^t; t >= 1.
The sequence of indices k on which a(k) is a record (1,2,6,10,14,18,22,26,30,...), appears to be A111284.

Examples

			a(8) = a(25) = 1 because 8 and 25 are prime powers.
a(30) = 16 because 15 is the greatest proper unitary divisor of 30, so a(30) = 1 + 15*a(2) = 1 + 15 = 16.
		

Crossrefs

Programs

  • Mathematica
    f[n_] := If[PrimePowerQ[n], n,
      SelectFirst[Transpose@
        {Reverse@ #[[-Ceiling[Length[#]/2] ;; -2]],
          #[[2 ;; Ceiling[Length[#]/2]]]} &@ Divisors[n],
        CoprimeQ @@ # &][[1]] ]; f[1] = 1;
    a[n_] := 1 + #*a[n/#] &[f[n]]; a[1] = 0;
    Array[a, 120] (* Michael De Vlieger, Jun 24 2025 *)
  • PARI
    d(n) = if (omega(n) == 1, n, my(v=select(x->(gcd(x, n/x)==1), divisors(n))); v[#v-1]);
    lista(nn) = {va = vector(nn); va[1] = 0; for (n=2, nn, dn = d(n); va[n] = 1 + dn*va[n/dn];); va;} \\ Michel Marcus, Feb 10 2019
    
  • PARI
    A324388(n) = if(1>=omega(n),n,fordiv(n,d,if((d>1)&&(1==gcd(d,n/d)),return(n/d))));
    A306264(n) = if(1==n,0,my(d=A324388(n)); 1+(d*A306264(n/d))); \\ Antti Karttunen, Feb 28 2019

Formula

a(1) = 0; for n > 1, a(n) = 1 + (A324388(n) * a(n/A324388(n))). - Antti Karttunen, Feb 28 2019

A161718 Expansion of (1+3*x^2)/(1+x)^2.

Original entry on oeis.org

1, -2, 6, -10, 14, -18, 22, -26, 30, -34, 38, -42, 46, -50, 54, -58, 62, -66, 70, -74, 78, -82, 86, -90, 94, -98, 102, -106, 110, -114, 118, -122, 126, -130, 134, -138, 142, -146, 150, -154, 158, -162, 166, -170, 174, -178, 182, -186, 190, -194, 198, -202, 206, -210, 214, -218, 222, -226, 230, -234
Offset: 0

Views

Author

Pr Mosbah Amlouk (Mosbah.Amlouk(AT)fsb.rnu.tn), Jun 17 2009

Keywords

Crossrefs

Cf. A016825, A111284 (unsigned version), A135929, A137276.

Programs

  • Mathematica
    CoefficientList[Series[(1+3*x^2)/(1+x)^2,{x,0,80}],x] (* or *) LinearRecurrence[ {-2,-1},{1,-2,6},80] (* Harvey P. Dale, Mar 19 2016 *)
  • PARI
    x='x+O('x^99); Vec((1+3*x^2)/(1+x)^2) \\ Altug Alkan, Apr 17 2018

Formula

From R. J. Mathar, Aug 27 2009: (Start)
a(n) = -2*a(n-1)-a(n-2), n>3.
G.f.: (1+3*x^2)/(1+x)^2.
a(n) = 4*(-1)^n*n+2*(-1)^(n+1) = (-1)^n*A016825(n-1), n>0. (End)
E.g.f.: 3 - 2*exp(-x)*(1 + 2*x). - Stefano Spezia, Feb 02 2023

Extensions

Spurious commas in sequence deleted by N. J. A. Sloane, Aug 02 2009
Offset corrected, extended by R. J. Mathar, Aug 27 2009
Edited by Joerg Arndt, Sep 04 2011

A247555 A permutation of the nonnegative numbers: a(4n) = 8n, a(4n+1) = 2n + 1, a(4n+2) = 4n + 2, a(4n+3) = 8n + 4.

Original entry on oeis.org

0, 1, 2, 4, 8, 3, 6, 12, 16, 5, 10, 20, 24, 7, 14, 28, 32, 9, 18, 36, 40, 11, 22, 44, 48, 13, 26, 52, 56, 15, 30, 60, 64, 17, 34, 68, 72, 19, 38, 76, 80, 21, 42, 84, 88, 23, 46, 92, 96, 25, 50, 100, 104, 27, 54, 108, 112, 29, 58, 116, 120
Offset: 0

Views

Author

Paul Curtz, Sep 19 2014

Keywords

Comments

A permutation of the nonnegative integers.

Crossrefs

Programs

  • Magma
    &cat[[4*(i-1),i,2*i,4*i]: i in [1..50 by 2]]; // Bruno Berselli, Sep 19 2014
  • Mathematica
    a[n_]:=Switch[Mod[n,4],0,2 n,1,(n+1)/2,2,n,3,2 n-2]; Table[a[n],{n,0,60}] (* Jean-François Alcover, Oct 09 2014 *)
    LinearRecurrence[{0,0,0,2,0,0,0,-1}, {0,1,2,4,8,3,6,12}, 50] (* G. C. Greubel, May 01 2018 *)
  • PARI
    Vec(x*(4*x^6+2*x^5+x^4+8*x^3+4*x^2+2*x+1)/((x-1)^2*(x+1)^2*(x^2+1)^2) + O(x^100)) \\ Colin Barker, Sep 19 2014
    

Formula

a(n) = a(n-4) + a(n-8) - a(n-12).
a(n) = 2*a(n-4) - a(n-8). - Colin Barker, Sep 19 2014
G.f.: x*(4*x^6 + 2*x^5 + x^4 + 8*x^3 + 4*x^2 + 2*x + 1) / ((x-1)^2*(x+1)^2*(x^2+1)^2). - Colin Barker, Sep 19 2014
a(n) = (11*n-3+(n+3)*(-1)^n+(4*n-1+(-1)^n)*cos(n*Pi/2)+2*(9-3*n+4(-1)^n)* sin(n*Pi/2))/8. - Wesley Ivan Hurt, May 07 2021

A302986 Number of partitions of n into two distinct parts (p,q) such that p, q and |q-p| are all squarefree.

Original entry on oeis.org

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

Views

Author

Wesley Ivan Hurt, Apr 16 2018

Keywords

Crossrefs

Programs

Formula

a(n) = Sum_{i=1..floor((n-1)/2)} mu(i)^2 * mu(n-i)^2 * mu(n-2*i)^2, where mu is the Möbius function (A008683).
a(n) = 0 for n in A111284. - Michel Marcus, Apr 17 2018
Showing 1-8 of 8 results.