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-10 of 10 results.

A016897 a(n) = 5*n + 4.

Original entry on oeis.org

4, 9, 14, 19, 24, 29, 34, 39, 44, 49, 54, 59, 64, 69, 74, 79, 84, 89, 94, 99, 104, 109, 114, 119, 124, 129, 134, 139, 144, 149, 154, 159, 164, 169, 174, 179, 184, 189, 194, 199, 204, 209, 214, 219, 224, 229, 234, 239, 244, 249, 254, 259, 264, 269, 274, 279, 284
Offset: 0

Views

Author

Keywords

Comments

Except for 1, 2, n such that Sum_{k=1..n} (k mod 5)*C(n,k) is a power of 2. - Benoit Cloitre, Oct 17 2002
Numbers ending in 4 or 9. - Lekraj Beedassy, Jul 08 2006
The set of numbers congruent to 4 mod 5. - Gary Detlefs, Mar 07 2010
Also the number of (not necessarily maximal) cliques in the n-book graph and (n+1)-ladder graph. - Eric W. Weisstein, Nov 29 2017

Crossrefs

Programs

Formula

G.f.: (4+x)/(1-x)^2. - Paul Barry, Feb 27 2003
a(n) = 2*a(n-1) - a(n-2), n>1. - Philippe Deléham, Nov 03 2008
a(n) = A131098(n+2) + n + 1. - Jaroslav Krizek, Aug 15 2009
a(n) = 10*n - a(n-1) + 3, n>0. - Vincenzo Librandi, Nov 20 2010
A000041(a(n)) == 0 mod 5 is the first of Ramanujan's congruences. - Ivan N. Ianakiev, Dec 29 2014
a(n) = (n+2)^2 - 2*A000217(n-1). See Mirror Triangles illustration. - Leo Tavares, Aug 18 2021
Sum_{n>=0} (-1)^n/a(n) = sqrt(10*(5+sqrt(5)))*Pi/50 - log(2)/5 - sqrt(5)*log(phi)/5, where phi is the golden ratio (A001622). - Amiram Eldar, Dec 07 2021
E.g.f.: exp(x)*(4 + 5*x). - Elmo R. Oliveira, Mar 08 2024

A174723 a(n) = n*(4*n^2 - 3*n + 5)/6.

Original entry on oeis.org

1, 5, 16, 38, 75, 131, 210, 316, 453, 625, 836, 1090, 1391, 1743, 2150, 2616, 3145, 3741, 4408, 5150, 5971, 6875, 7866, 8948, 10125, 11401, 12780, 14266, 15863, 17575, 19406, 21360, 23441, 25653, 28000, 30486, 33115, 35891, 38818, 41900, 45141
Offset: 1

Views

Author

Michel Lagneau, Mar 28 2010

Keywords

Comments

We prove that a(n) = Sum_{k=1..n^2} floor(sqrt(k)): a(n) = Sum_{k=1..3} 1 + Sum_{k=4..8} 2 + ... + Sum_{k=(n-1)^2..n^2 - 1} (n-1) + n = 3*1 + 5*2 + 7*3 + ... + (2n-1)(n-1)+ n = Sum_{k=1..n} (2k-1)*(k-1) + n = 2*Sum_{k=1..n} k^2 - 3*Sum_{k=1..n} k + 2n = 2n(n+1)(2n+1)/6 - 3n(n+1)/2 + 2n = n*(4n^2 - 3n + 5) / 6.
Notice that a(4) = 4 + 3*5 + 2*6 + 1*7 and a(8) = 8 + 7*9 + 6*10 + 5*11 + 4*12 + 3*13 + 2*14 + 1*15. In general, a(n) = n + Sum_{k=1..n-1} (n-k)*(n+k). - J. M. Bergot, Jul 31 2013

Examples

			From _Bruno Berselli_, Feb 17 2015: (Start)
Third differences:  1, 2,  4,  4,   4,   4,   4, (repeat 4) ... (A151798)
Second differences: 1, 3,  7, 11,  15,  19,  23,  27,   31, ... (A131098)
First differences:  1, 4, 11, 22,  37,  56,  79, 106,  137, ... (A084849)
-------------------------------------------------------------------------
This sequence:      1, 5, 16, 38,  75, 131, 210, 316,  453, ...
-------------------------------------------------------------------------
Partial sums:       1, 6, 22, 60, 135, 266, 476, 792, 1245, ... (A071239)
(End)
		

References

  • T. M. Apostol, Introduction to Analytic Number Theory, Springer-Verlag, 1976.
  • G. H. Hardy and E. M. Wright, An Introduction to the Theory of Numbers, 3rd ed., Oxford Univ. Press, 1954.

Crossrefs

Programs

  • Magma
    I:=[1, 5, 16, 38]; [n le 4 select I[n] else 4*Self(n-1)-6*Self(n-2)+4*Self(n-3)-Self(n-4): n in [1..50]]; // Vincenzo Librandi, Jul 04 2012
    
  • Maple
    A174723 := proc(n)
            n*(4*n^2-3*n+5)/6 ;
    end proc:
    seq( A174723(n),n=1..20) ; # R. J. Mathar, Nov 07 2011
  • Mathematica
    Table[n (4n^2-3n+5)/6,{n,50}] (* or *) LinearRecurrence[{4,-6,4,-1},{1,5,16,38},50] (* Harvey P. Dale, Jan 16 2012 *)
  • PARI
    a(n)=n*(4*n^2-3*n+5)/6 \\ Charles R Greathouse IV, Oct 07 2015

Formula

G.f. x*(1 + x + 2*x^2) / (x-1)^4. - R. J. Mathar, Nov 07 2011
a(1)=1, a(2)=5, a(3)=16, a(4)=38; for n > 4, a(n) = 4*a(n-1) - 6*a(n-2) + 4*a(n-3) - a(n-4). - Harvey P. Dale, Jan 16 2012
a(n) = A022554(n^2). - Ridouane Oudra, Jun 13 2025

A190816 a(n) = 5*n^2 - 4*n + 1.

Original entry on oeis.org

1, 2, 13, 34, 65, 106, 157, 218, 289, 370, 461, 562, 673, 794, 925, 1066, 1217, 1378, 1549, 1730, 1921, 2122, 2333, 2554, 2785, 3026, 3277, 3538, 3809, 4090, 4381, 4682, 4993, 5314, 5645, 5986, 6337, 6698, 7069, 7450, 7841, 8242, 8653, 9074
Offset: 0

Views

Author

Keywords

Comments

For n >= 2, hypotenuses of primitive Pythagorean triangles with m = 2*n-1, where the sides of the triangle are a = m^2 - n^2, b = 2*n*m, c = m^2 + n^2; this sequence is the c values, short sides (a) are A045944(n-1), and long sides (b) are A002939(n).

Crossrefs

Short sides (a) A045944(n-1), long sides (b) A002939(n).
Cf. A017281 (first differences), A051624 (a(n)-1), A202141.
Sequences of the form m*n^2 - 4*n + 1: -A131098 (m=0), A028872 (m=1), A056220 (m=2), A045944 (m=3), A016754 (m=4), this sequence (m=5), A126587 (m=6), A339623 (m=7), A080856 (m=8).

Programs

  • Magma
    [5*n^2 - 4*n + 1: n in [0..50]]; // Vincenzo Librandi, Jun 19 2011
    
  • Mathematica
    Table[5*n^2 - 4*n + 1, {n, 0, 100}]
    LinearRecurrence[{3,-3,1},{1,2,13},100] (* or *) CoefficientList[ Series[ (-10 x^2+x-1)/(x-1)^3,{x,0,100}],x] (* Harvey P. Dale, May 24 2011 *)
  • PARI
    a(n)=5*n^2-4*n+1 \\ Charles R Greathouse IV, Oct 16 2015
    
  • SageMath
    [5*n^2-4*n+1 for n in range(41)] # G. C. Greubel, Dec 03 2023

Formula

From Harvey P. Dale, May 24 2011: (Start)
a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3); a(0)=1, a(1)=2, a(2)=13.
G.f.: (1 - x + 10*x^2)/(1-x)^3. (End)
E.g.f.: (1 + x + 5*x^2)*exp(x). - G. C. Greubel, Dec 03 2023

Extensions

Edited by Franklin T. Adams-Watters, May 20 2011

A151798 a(0)=1, a(1)=2, a(n)=4 for n>=2.

Original entry on oeis.org

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

Views

Author

David Applegate, Jun 29 2009

Keywords

Comments

A010709 preceded by 1, 2.
Partial sums give A131098.
The INVERT transform gives A077996 without A077996(0). The Motzkin transform gives A105696 without A105696(0). Decimal expansion of 28/225=0.12444... . - R. J. Mathar, Jun 29 2009
Continued fraction expansion of 1 + sqrt(1/5). - Arkadiusz Wesolowski, Mar 30 2012
The number of solutions x (mod 2^(n+1)) of x^2 = 1 (mod 2^(n+1)), namely x = 1 (n=0), x = -1, 1 (n=1) and x = -1, 1, 2^n-1, 2^n+1 (n at least 2). - Christopher J. Smyth, May 15 2014
Also, the number of n-step self-avoiding walks on the L-lattice with no non-contiguous adjacencies (see A322419 for details of L-lattice). - Sean A. Irvine, Jul 29 2020

Crossrefs

Programs

  • Magma
    [ n le 1 select n+1 else 4: n in [0..104] ];
    
  • Mathematica
    f[n_] := Fold[#2*Floor[#1/#2 + 1/2] &, n, Reverse@ Range[n - 1]]; Array[f, 55]
  • PARI
    Vec((1+x+2*x^2)/(1-x) + O(x^100)) \\ Altug Alkan, Jan 19 2016

Formula

G.f.: (1+x+2*x^2)/(1-x).
E.g.f. A(x)=x*B(x) satisfies the differential equation B'(x)=1+x+x^2+B(x). - Vladimir Kruchinin, Jan 19 2011
E.g.f.: 4*exp(x) - 2*x - 3. - Elmo R. Oliveira, Aug 06 2024

A144708 a(n) = 6^n * (1-4*n).

Original entry on oeis.org

1, -18, -252, -2376, -19440, -147744, -1073088, -7558272, -52068096, -352719360, -2358180864, -15600273408, -102308769792, -666095394816, -4310029025280, -27740914089984, -177729924169728, -1134086182797312, -7210756923457536
Offset: 0

Views

Author

Paul Barry, Sep 19 2008

Keywords

Crossrefs

Hankel transform of A144706.

Programs

  • Magma
    [(1-4*n)*6^n: n in [0..30]]; // G. C. Greubel, Jun 16 2022
    
  • Mathematica
    Table[6^n (1-4n),{n,0,20}] (* Harvey P. Dale, Apr 01 2011 *)
  • SageMath
    [(1-4*n)*6^n for n in (0..30)] # G. C. Greubel, Jun 16 2022

Formula

G.f.: (1-30*x)/(1-6*x)^2.
E.g.f.: (1-24*x)*exp(6*x). - G. C. Greubel, Jun 16 2022

A214863 Numbers n such that n XOR 11 = n - 11.

Original entry on oeis.org

11, 15, 27, 31, 43, 47, 59, 63, 75, 79, 91, 95, 107, 111, 123, 127, 139, 143, 155, 159, 171, 175, 187, 191, 203, 207, 219, 223, 235, 239, 251, 255, 267, 271, 283, 287, 299, 303, 315, 319, 331, 335, 347, 351, 363
Offset: 1

Views

Author

Brad Clardy, Mar 09 2013

Keywords

Comments

Links to sequences of the form n XOR m = n - m are found below with the value of m specified.

Crossrefs

Cf. A005408 (m=1), A042964 (m=2), A131098 (m=3), A047566 (m=4), A047550 (m=5), A047589 (m=6), A004771 (m=7), A115419 (m=8), A214865 (m=9), A214864 (m=10), A133894 (m=12), A125169 (m=15).
Cf. also A016825, A168392.

Programs

  • Magma
    XOR := func;
    m:=11;
    for n in [1 .. 500] do
          if (XOR(n, m) eq n-m) then n; end if;
    end for;
  • Mathematica
    Select[Range[400],BitXor[#,11]==#-11&] (* or *) LinearRecurrence[{1,1,-1},{11,15,27},50] (* Harvey P. Dale, Jun 05 2021 *)

Formula

a(n)= 1+8*n-2*(-1)^n.
a(n)=A016825(n) + A168392(n) + for n>0.
G.f. x*(11+4*x+x^2) / ( (1+x)*(x-1)^2 ). - R. J. Mathar, Mar 10 2013

A295077 a(n) = 2*n*(n-1) + 2^n - 1.

Original entry on oeis.org

0, 1, 7, 19, 39, 71, 123, 211, 367, 655, 1203, 2267, 4359, 8503, 16747, 33187, 66015, 131615, 262755, 524971, 1049335, 2097991, 4195227, 8389619, 16778319, 33555631, 67110163, 134219131, 268436967, 536872535, 1073743563, 2147485507
Offset: 0

Views

Author

Keywords

Comments

We have a(0) = 0, and for n > 0, a(n) is a subsequence of A131098 where the indices are given by the partial sums of A288382.
For n > 0, a(n) gives the number of words of length n over the alphabet A = {a,b,c,d} such that: a word containing 'c' does not contain 'b' or 'd'; a word cannot be fully written with 'a'; a word contains letters from {b,d} if and only if it contains exactly a unique couple of letters from {b,d}. Thus a(1) = 1 where the corresponding word is "c" since 'c' is the only letter allowed to be written alone.
Primes in the sequence are 7, 19, 71, 211, 367, 2267, 16747, 524971, ... which are of the form 4*k + 3 (A002145).
The second difference of this sequence is A140504.

Examples

			a(4) = 39. The corresponding words are aabb, aabd, aadb, aadd, abab, abad, abba, abda, adab, adad, adba, adda, aaac, aaca, aacc, acaa, acac, acca, accc, baab, baad, baba, bada, bbaa, bdaa, caaa, caac, caca, cacc, ccaa, ccac, ccca, cccc, daab, daad, daba, dada, dbaa, ddaa.
		

References

  • R. L. Graham, D. E. Knuth and O. Patashnik, Concrete Mathematics: A Foundation for Computer Science, Addison-Wesley, 1994.

Crossrefs

Programs

  • Magma
    [2*n*(n-1)+2^n-1 : n in [0..40]]; // Wesley Ivan Hurt, Nov 26 2017
  • Maple
    A295077:=n->2*n*(n-1)+2^n-1; seq(A295077(n), n=0..70);
  • Mathematica
    Table[2 n (n - 1) + 2^n - 1, {n, 0, 70}]
  • PARI
    a(n) = 2*n*(n-1) + 2^n - 1; \\ Michel Marcus, Nov 14 2017
    

Formula

G.f.: (x + 2*x^2 - 7*x^3)/((1 - x)^3*(1 - 2*x)).
a(0)=0, a(1)=1, a(2)=7, a(3)=19; for n>3, a(n) = 5*a(n-1) - 9*a(n-2) + 7*a(n-3) - 2*a(n-4).
a(n) = 2*A131924(n-1) - 1 for n>0, a(0)=0.
a(n) = a(n-1) + A000079(n-1) + A008586(n-1) for n>0, a(0)=0.
a(n) = A126646(n-1) + A046092(n-1) for n>0, a(0)=0.
a(n+1) - 2*a(n) + a(n-1) = A140504(n-1) for n>0, a(0)=0.
E.g.f.: exp(2*x) - (1 - 2*x^2)*exp(x). - G. C. Greubel, Oct 17 2018

A175717 First differences of A175628.

Original entry on oeis.org

0, 3, 2, 3, -5, 12, 6, 3, -22, 33, 10, 3, -33, 48, 14, 3, -74, 93, 18, 3, -85, 108, 22, 3, -156, 183, 26, 3, -161, 192, 30, 3, -268, 303, 34, 3, -261, 300, 38, 3, -410, 453, 42, 3, -385, 432, 46, 3, -582, 633, 50, 3, -533, 588, 54, 3, -784, 843, 58, 3, -705, 768, 62, 3, -1016, 1083, 66, 3, -901, 972, 70
Offset: 0

Views

Author

Paul Curtz, Dec 04 2010

Keywords

Crossrefs

Programs

  • Magma
    R:= RealField(20);
    b:= func< n | (n mod 2) eq 1 select (n-1)*(n+3)/4 else Round((n^2+4*n-12)*(37 +27*(-1)^(n/2) +6*Cos((n+2)*Pi(R)/4))/2^8) >;
    [b(n+2) - b(n+1): n in [0..90]]; // G. C. Greubel, Sep 19 2018; Dec 04 2019
    
  • Maple
    A175628 := proc(n) if type(n,'even') then nh := n/2 +1; 1/4-1/nh^2 ; numer(%) ; else nh := (n-1)/2 ; nh*(nh+2) ; end if; end proc:
    A175717 := proc(n) A175628(n+2)-A175628(n+1) ; end proc:
  • Mathematica
    LinearRecurrence[{-1,-1,-1,-1,-1,-1,-1,2,2,2,2,2,2,2,2,-1,-1,-1,-1,-1,-1,-1,-1},{0,3,2,3,-5,12,6,3,-22,33,10,3,-33,48,14,3,-74,93,18,3,-85,108,22},90] (* Harvey P. Dale, Apr 17 2015 *)
    b[n_]:= If[OddQ[n], (n-1)*(n+3)/4, (n^2+4*n-12)*(37 +27*(-1)^(n/2) +6*Cos[(n+2)*Pi/4])/2^8]; Table[b[n+2] - b[n+1], {n, 0, 90}] (* G. C. Greubel, Dec 04 2019 *)
  • PARI
    b(n) = if(n%2==1, (n-1)*(n+3)/4, round((n^2+4*n-12)*(37 +27*(-1)^(n/2) +6*cos((n+2)*Pi/4))/2^8) );
    vector(91, n, b(n+1) - b(n) ) \\ G. C. Greubel, Sep 19 2018; Dec 04 2019
    
  • Sage
    def b(n):
        if (mod(n,2)==1): return (n-1)*(n+3)/4
        else: return round((n^2+4*n-12)*(37 +27*(-1)^(n/2) +6*cos((n+2)*pi/4))/2^8)
    [b(n+2) -b(n+1) for n in (0..90)] # G. C. Greubel, Dec 04 2019

Formula

a(2*n) + a(2*n+1) = A144396(n+1).
It seems that a(n) = 3 iff n in A131098.
a(n) = A175628(n+2) - A175628(n+1).
a(n)= -a(n-1) -a(n-2) -a(n-3) -a(n-4) -a(n-5) -a(n-6) -a(n-7) +2*a(n-8) +2*a(n-9) +2*a(n-10) +2*a(n-11) +2*a(n-12) +2*a(n-13) +2*a(n-14) +2*a(n-15) -a(n-16) -a(n-17) -a(n-18) -a(n-19) -a(n-20) -a(n-21) -a(n-22) -a(n-23). - R. J. Mathar, Dec 08 2010
From Luce ETIENNE, Dec 29 2019: (Start)
a(n) = 3*a(n-8) - 3*a(n-16) + a(n-24).
a(n) = (3*(264*m^7 - 6377*m^6 + 60963*m^5 - 293615*m^4 + 748881*m^3 - 962528*m^2 + 502812*m - 25200)*floor(n/8)^2 + 7*(136*m^7 - 3209*m^6 + 29731*m^5 - 137375*m^4 + 332209*m^3 - 400496*m^2 + 194844*m - 5040)*floor(n/8) + m*(472*m^6 - 11235*m^5 + 105049*m^4 - 488985*m^3 + 1181803*m^2 - 1389780*m + 617796))/5040, where m = n mod 8. (End)

A175976 a(n) = 4^n - 3*n + 1.

Original entry on oeis.org

2, 2, 11, 56, 245, 1010, 4079, 16364, 65513, 262118, 1048547, 4194272, 16777181, 67108826, 268435415, 1073741780, 4294967249, 17179869134, 68719476683, 274877906888, 1099511627717, 4398046511042, 17592186044351, 70368744177596, 281474976710585, 1125899906842550
Offset: 0

Views

Author

Vincenzo Librandi, Nov 02 2010

Keywords

Examples

			a(1)=4-3+1=2. a(2)=16-6+1=11.
		

Crossrefs

Programs

  • Magma
    [4^n-3*n+1: n in [0..30]]; // Vincenzo Librandi, Mar 20 2014
  • Maple
    A175976 := proc(n) 4^n-3*n+1 ; end proc:
  • Mathematica
    Table[4^n-3n+1,{n,0,30}] (* or *) LinearRecurrence[{6,-9,4},{2,2,11},30] (* Harvey P. Dale, Jul 07 2013 *)

Formula

G.f.: (-2+10*x-17*x^2)/((4*x-1)*(x-1)^2).
From Bruno Berselli, Nov 04 2010: (Start)
a(n) - 6*a(n-1) + 9*a(n-2) - 4*a(n-3) = 0 for n > 2.
a(n) = A158879(n) - A131098(n+1) (n > 0). (End)
E.g.f.: exp(x)*(1 - 3*x + exp(3*x)). - Elmo R. Oliveira, Mar 07 2025

Extensions

G.f., program and link to recurrences from R. J. Mathar, Nov 03 2010

A382310 Array read by ascending antidiagonals: A(n,m) is the squared distance between the roots of the 2nd degree equations z^2 +- n*z + m = 0 on the complex plane.

Original entry on oeis.org

0, 1, 4, 4, 3, 8, 9, 0, 7, 12, 16, 5, 4, 11, 16, 25, 12, 1, 8, 15, 20, 36, 21, 8, 3, 12, 19, 24, 49, 32, 17, 4, 7, 16, 23, 28, 64, 45, 28, 13, 0, 11, 20, 27, 32, 81, 60, 41, 24, 9, 4, 15, 24, 31, 36, 100, 77, 56, 37, 20, 5, 8, 19, 28, 35, 40, 121, 96, 73, 52, 33, 16, 1, 12, 23, 32, 39, 44
Offset: 0

Views

Author

Stefano Spezia, Mar 21 2025

Keywords

Examples

			The array begins as:
   0,  4,  8, 12, 16, 20, 24, 28, 32, 36, 40, 44, ...
   1,  3,  7, 11, 15, 19, 23, 27, 31, 35, 39, 43, ...
   4,  0,  4,  8, 12, 16, 20, 24, 28, 32, 36, 40, ...
   9,  5,  1,  3,  7, 11, 15, 19, 23, 27, 31, 35, ...
  16, 12,  8,  4,  0,  4,  8, 12, 16, 20, 24, 28, ...
  25, 21, 17, 13,  9,  5,  1,  3,  7, 11, 15, 19, ...
  ...
A(2,0) = 4 since z^2 - 2*z = 0 and z^2 + 2*z = 0 have respectively roots 0, 2, and -2, 0 with squared distance equal to 4;
A(1,2) = 7 since z^2 - z + 2 = 0 and z^2 + z + 2 = 0 have respectively roots (1 +- i*sqrt(7))/2 and (-1 +- i*sqrt(7))/2 with squared distance equal to 7, where i denotes the imaginary unit.
		

Crossrefs

Cf. A000290 (m=0), A008586 (n=0), A028347, A028566, A028884, A131098, A134594, A145917, A382311 (antidiagonal sums).

Programs

  • Mathematica
    A[n_,m_]:=Abs[n^2-4m]; Table[A[n-m,m],{n,0,11},{m,0,n}]//Flatten

Formula

A(n,m) = abs(n^2 - 4*m).
A(n,n) = A028347(n-2) for n > 3.
A(n,1) = A028347(n) for n > 1.
A(n,2) = A028884(n-3) for n > 2.
A(n,4) = A028566(n-4) for n > 3.
A(n,5) = A134594(n-5) for n > 4.
A(1,n) = A131098(n+1).
Showing 1-10 of 10 results.