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

A004770 Numbers of the form 8k+5; or, numbers whose binary expansion ends in 101.

Original entry on oeis.org

5, 13, 21, 29, 37, 45, 53, 61, 69, 77, 85, 93, 101, 109, 117, 125, 133, 141, 149, 157, 165, 173, 181, 189, 197, 205, 213, 221, 229, 237, 245, 253, 261, 269, 277, 285, 293, 301, 309, 317, 325, 333, 341, 349, 357, 365, 373, 381, 389, 397, 405, 413, 421, 429, 437, 445
Offset: 1

Views

Author

Keywords

Comments

Only numbers of the form 8k+5 may be written as a sum of 5 odd squares. Examples: 5 = 1+1+1+1+1, 13 = 9+1+1+1+1, 21 = 9+9+1+1+1, 29 = 25+1+1+1+1= 9+9+9+1+1, 37 = 9+9+9+9+1 = 25+9+1+1+1, 45 = 25+9+9+1+1=9+9+9+9+9, 53 = 49+1+1+1+1 = 25+25+1+1+1 = 25+9+9+9+1, ... - Philippe Deléham, Sep 03 2005
Positive solutions to the equation x == 5 (mod 8). - K.V.Iyer, Apr 27 2009

References

  • James J. Tattersall, Elementary Number Theory in Nine Chapters, Cambridge University Press, 1999, page 248.

Crossrefs

Cf. A004776 (complement), A007521 (primes).

Programs

Formula

From R. J. Mathar, Mar 14 2011: (Start)
a(n) = 8*n - 3.
G.f.: x*(5+3*x)/(x-1)^2. (End)
a(n) = 2*a(n-1) - a(n-2). - Vincenzo Librandi, May 28 2011
From Elmo R. Oliveira, Apr 03 2025: (Start)
E.g.f.: exp(x)*(8*x - 3) + 3.
a(n) = A113770(n)/2 = A016813(2*n-1). (End)

A220062 Number A(n,k) of n length words over k-ary alphabet, where neighboring letters are neighbors in the alphabet; square array A(n,k), n>=0, k>=0, read by antidiagonals.

Original entry on oeis.org

1, 1, 0, 1, 1, 0, 1, 2, 0, 0, 1, 3, 2, 0, 0, 1, 4, 4, 2, 0, 0, 1, 5, 6, 6, 2, 0, 0, 1, 6, 8, 10, 8, 2, 0, 0, 1, 7, 10, 14, 16, 12, 2, 0, 0, 1, 8, 12, 18, 24, 26, 16, 2, 0, 0, 1, 9, 14, 22, 32, 42, 42, 24, 2, 0, 0, 1, 10, 16, 26, 40, 58, 72, 68, 32, 2, 0, 0
Offset: 0

Views

Author

Alois P. Heinz, Dec 03 2012

Keywords

Comments

Equivalently, the number of walks of length n-1 on the path graph P_k. - Andrew Howroyd, Apr 17 2017

Examples

			A(5,3) = 12: there are 12 words of length 5 over 3-ary alphabet {a,b,c}, where neighboring letters are neighbors in the alphabet: ababa, ababc, abcba, abcbc, babab, babcb, bcbab, bcbcb, cbaba, cbabc, cbcba, cbcbc.
Square array A(n,k) begins:
  1,  1,  1,  1,  1,   1,   1,   1, ...
  0,  1,  2,  3,  4,   5,   6,   7, ...
  0,  0,  2,  4,  6,   8,  10,  12, ...
  0,  0,  2,  6, 10,  14,  18,  22, ...
  0,  0,  2,  8, 16,  24,  32,  40, ...
  0,  0,  2, 12, 26,  42,  58,  74, ...
  0,  0,  2, 16, 42,  72, 104, 136, ...
  0,  0,  2, 24, 68, 126, 188, 252, ...
		

Crossrefs

Columns k=0, 2-10 give: A000007, A040000, A029744(n+2) for n>0, A006355(n+3) for n>0, A090993(n+1) for n>0, A090995(n-1) for n>2, A129639, A153340, A153362, A153360.
Rows 0-6 give: A000012, A001477, A005843(k-1) for k>0, A016825(k-2) for k>1, A008590(k-2) for k>2, A113770(k-2) for k>3, A063164(k-2) for k>4.
Main diagonal gives: A102699.

Programs

  • Maple
    b:= proc(n, i, k) option remember; `if`(n=0, 1,
          `if`(i=0, add(b(n-1, j, k), j=1..k),
          `if`(i>1, b(n-1, i-1, k), 0)+
          `if`(i b(n, 0, k):
    seq(seq(A(n, d-n), n=0..d), d=0..14);
  • Mathematica
    b[n_, i_, k_] := b[n, i, k] = If[n == 0, 1, If[i == 0, Sum[b[n-1, j, k], {j, 1, k}], If[i>1, b[n-1, i-1, k], 0] + If[iJean-François Alcover, Jan 19 2015, after Alois P. Heinz *)
  • PARI
    TransferGf(m,u,t,v,z)=vector(m,i,u(i))*matsolve(matid(m)-z*matrix(m,m,i,j,t(i,j)),vectorv(m,i,v(i)));
    ColGf(m,z)=1+z*TransferGf(m, i->1, (i,j)->abs(i-j)==1, j->1, z);
    a(n,k)=Vec(ColGf(k,x) + O(x^(n+1)))[n+1];
    for(n=0, 7, for(k=0, 7, print1( a(n,k), ", ") ); print(); );
    \\ Andrew Howroyd, Apr 17 2017

A188135 a(n) = 8*n^2 + 2*n + 1.

Original entry on oeis.org

1, 11, 37, 79, 137, 211, 301, 407, 529, 667, 821, 991, 1177, 1379, 1597, 1831, 2081, 2347, 2629, 2927, 3241, 3571, 3917, 4279, 4657, 5051, 5461, 5887, 6329, 6787, 7261, 7751, 8257, 8779, 9317, 9871, 10441, 11027, 11629, 12247, 12881, 13531, 14197, 14879, 15577, 16291, 17021, 17767
Offset: 0

Views

Author

Paul Curtz, Mar 30 2011

Keywords

Comments

Bisection of A193867. - Omar E. Pol, Aug 16 2011
Sequence found by reading the line from 1, in the direction 1, 11, ..., in the square spiral whose vertices are the triangular numbers A000217. - Omar E. Pol, Sep 04 2011

Crossrefs

Programs

Formula

First differences: a(n) - a(n-1) = 16*n - 6 = A113770(n) = 2*A004770(n).
Second differences: a(n) - 2*a(n-1) + a(n-2) = 16.
a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3).
From R. J. Mathar, Apr 06 2011: (Start)
G.f.: -(1+x)*(7*x+1)/(x-1)^3.
a(n) = A084849(2*n). (End)
E.g.f.: exp(x)*(1 + 10*x + 8*x^2). - Elmo R. Oliveira, Oct 19 2024

Extensions

a(41)-a(47) from Elmo R. Oliveira, Oct 19 2024

A115284 Correlation triangle of 4-C(1,n)-2*C(0,n) (A113311).

Original entry on oeis.org

1, 3, 3, 4, 10, 4, 4, 15, 15, 4, 4, 16, 26, 16, 4, 4, 16, 31, 31, 16, 4, 4, 16, 32, 42, 32, 16, 4, 4, 16, 32, 47, 47, 32, 16, 4, 4, 16, 32, 48, 58, 48, 32, 16, 4, 4, 16, 32, 48, 63, 63, 48, 32, 16, 4, 4, 16, 32, 48, 64, 74, 64, 48, 32, 16, 4
Offset: 0

Views

Author

Paul Barry, Jan 19 2006

Keywords

Comments

Row sums are the coordination sequence for cubic lattice A005899. Diagonal sums are A115285. T(2n,n) is A113770. T(2n,n)-T(2n,n+1) is 1,6,10,10,10,.... (10-4C(1,n)-5C(0,n)).

Examples

			Triangle begins:
  1;
  3, 3;
  4, 10, 4;
  4, 15, 15, 4;
  4, 16, 26, 16, 4;
  4, 16, 31, 31, 16, 4;
  4, 16, 32, 42, 32, 16, 4;
		

Formula

G.f.: (1+x)^2*(1+x*y)^2/((1-x)*(1-x*y)*(1-x^2*y)).
T(n, k) = Sum_{j=0..n} [j<=k]*(4-C(1, k-j)-2*C(0, k-j))*[j<=n-k]*(4-C(1, n-k-j)-2*C(0, n-k-j)).

A247961 Numbers n such that 45^n + 2 is prime.

Original entry on oeis.org

0, 1, 2, 3, 4, 38, 40, 104, 114, 135, 417, 1251, 14786, 16720, 43831, 152659
Offset: 1

Views

Author

Vincenzo Librandi, Oct 02 2014

Keywords

Comments

Terms of A016969 and A113770 (except 1) are not in the sequence. - Bruno Berselli, Oct 02 2014
a(17) > 2*10^5. - Robert Price, Sep 15 2015

Crossrefs

Cf. similar sequences listed in A247957.

Programs

  • Magma
    [n: n in [0..400]| IsPrime( 45^n + 2 )];
    
  • Maple
    A247961:=n->`if`(isprime(45^n+2),n,NULL): seq(A247961(n),n=1..500); # Wesley Ivan Hurt, Oct 02 2014
  • Mathematica
    Select[Range[0, 2000], PrimeQ[45^# + 2] &]
  • PARI
    is(n)=ispseudoprime(45^n+2) \\ Charles R Greathouse IV, Jun 06 2017

Extensions

a(13)-a(16) from Robert Price, Sep 15 2015

A268730 a(n) = Product_{k = 0..n} 2*(8*k + 5).

Original entry on oeis.org

10, 260, 10920, 633360, 46868640, 4218177600, 447126825600, 54549472723200, 7527827235801600, 1159285394313446400, 197078517033285888000, 36656604168191175168000, 7404634041974617383936000, 1614210221150466589698048000, 377725191749209181989343232000
Offset: 0

Views

Author

Ilya Gutkovskiy, Feb 12 2016

Keywords

Examples

			a(0) = (1 + 2 + 3 + 4) = 10;
a(1) = (1 + 2 + 3 + 4)*(5 + 6 + 7 + 8) = 260;
a(2) = (1 + 2 + 3 + 4)*(5 + 6 + 7 + 8) *(9 + 10 + 11 + 12) = 10920;
a(3) = (1 + 2 + 3 + 4)*(5 + 6 + 7 + 8) *(9 + 10 + 11 + 12)*(13 + 14 + 15 + 16) = 633360, etc.
		

Crossrefs

Programs

  • Magma
    [&*[(16*k+10): k in [0..n-1]]: n in [1..20]]; // Vincenzo Librandi, Feb 12 2016
    
  • Mathematica
    FullSimplify[Table[(2^(4 n + 13/4) Gamma[1/8] Gamma[n + 13/8])/(Sqrt[Pi] Gamma[1/4]), {n, 0, 14}]]
    Table[Product[16 k + 10, {k, 0, n - 1}], {n, 20}] (* Vincenzo Librandi, Feb 12 2016 *)
  • PARI
    x='x+O('x^50); Vec(serlaplace(10/(1 - 16*x)^(13/8))) \\ G. C. Greubel, Apr 09 2017

Formula

a(n) = (2^(4*n + 13/4)*Gamma(1/8)*Gamma(n + 13/8))/(sqrt(Pi)*Gamma(1/4)), where Gamma(x) is the gamma function.
a(n) = 2*(8*n + 5)*a(n - 1), a(0)=10.
Sum_{n>=0} 1/a(n) = (exp(1/16)*(Gamma(5/8) - Gamma(5/8, 1/16)))/(2*sqrt(2)) = 0.10393932939417..., where Gamma(a, x) is the incomplete gamma function.
a(n) ~ sqrt(Pi) * 2^(4*n+9/2) * n^(n+9/8) / (Gamma(5/8) * exp(n)). - Vaclav Kotesovec, Feb 20 2016
G.f.: 10/(1-b(1)x/(1-(b(1)-10)x/(1-b(2)x/(1-(b(2)-10)x/(1-b(3)x/(...)))))), where b(n)=2(5+8n), i.e. 26,42,58,74. - Benedict W. J. Irwin, Feb 24 2016
a(n) = 2^(n+1)*A147625(n+2). - R. J. Mathar, Jun 07 2016
E.g.f.: 10/(1 - 16*x)^(13/8). - Ilya Gutkovskiy, Jun 07 2016
Showing 1-6 of 6 results.