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 11-20 of 52 results. Next

A252836 T(n,k)=Number of nXk nonnegative integer arrays with upper left 0 and every value within 2 of its king move distance from the upper left and every value increasing by 0 or 1 with every step right, diagonally se or down.

Original entry on oeis.org

1, 2, 2, 4, 5, 4, 7, 13, 13, 7, 11, 29, 44, 29, 11, 16, 53, 127, 127, 53, 16, 22, 85, 288, 493, 288, 85, 22, 29, 125, 529, 1474, 1474, 529, 125, 29, 37, 173, 850, 3365, 6068, 3365, 850, 173, 37, 46, 229, 1251, 6211, 18528, 18528, 6211, 1251, 229, 46, 56, 293, 1732, 10017
Offset: 1

Views

Author

R. H. Hardin, Dec 22 2014

Keywords

Comments

Table starts
..1...2....4.....7.....11......16.......22........29........37.........46
..2...5...13....29.....53......85......125.......173.......229........293
..4..13...44...127....288.....529......850......1251......1732.......2293
..7..29..127...493...1474....3365.....6211.....10017.....14783......20509
.11..53..288..1474...6068...18528....42738.....79563....129173.....191583
.16..85..529..3365..18528...78674...244131....569420...1070036....1750150
.22.125..850..6211..42738..244131..1056756...3320837...7822881...14827629
.29.173.1251.10017..79563..569420..3320837..14564701..46222275..109796227
.37.229.1732.14783.129173.1070036..7822881..46222275.204666202..654583926
.46.293.2293.20509.191583.1750150.14827629.109796227.654583926.2919462498

Examples

			Some solutions for n=4 k=4
..0..1..2..2....0..1..1..2....0..0..1..1....0..0..1..1....0..0..1..1
..1..1..2..2....0..1..1..2....1..1..1..1....0..1..1..1....1..1..1..1
..1..1..2..3....1..1..2..2....1..1..2..2....0..1..1..1....1..1..1..1
..1..2..2..3....1..1..2..2....1..2..2..3....1..1..2..2....1..1..2..2
		

Crossrefs

Column 1 is A000124(n-1)
Column 2 is A078370(n-2)

Formula

Empirical for column k:
k=1: a(n) = (1/2)*n^2 - (1/2)*n + 1
k=2: a(n) = 4*n^2 - 12*n + 13 for n>1
k=3: a(n) = 40*n^2 - 199*n + 283 for n>3
k=4: a(n) = 480*n^2 - 3394*n + 6449 for n>5
k=5: a(n) = 6400*n^2 - 59190*n + 143483 for n>7
k=6: a(n) = 90112*n^2 - 1032064*n + 3059590 for n>9
k=7: a(n) = 1306624*n^2 - 17846996*n + 62638467 for n>11

A086570 Expansion of (1 + 3x + 5x^2 + 7x^3 + ...) / (1 - 2x + 3x^2 - 4x^3 + ...).

Original entry on oeis.org

1, 5, 12, 20, 28, 36, 44, 52, 60, 68, 76, 84, 92, 100, 108, 116, 124, 132, 140, 148, 156, 164, 172, 180, 188, 196, 204, 212, 220, 228, 236, 244, 252, 260, 268, 276, 284, 292, 300, 308, 316, 324, 332, 340, 348, 356, 364, 372, 380, 388, 396, 404, 412, 420, 428
Offset: 0

Views

Author

Gary W. Adamson, Jul 22 2003

Keywords

Comments

Row sums of number triangle A113128. - Paul Barry, Oct 14 2005
The Engel expansion of 1 + exp(1/8)*sqrt(2*Pi)*erf(1/(2*sqrt(2)))/5 = 1.2175306077808... - Benedict W. J. Irwin, Dec 16 2016

Examples

			a(6) = 44 = 8 + a(5) = 8 + 36.
		

Crossrefs

Programs

Formula

a(0) = 1, a(1) = 5, a(2) = 12; then a(n+1) = a(n) + 8, n > 2.
From Paul Barry, Oct 14 2005: (Start)
G.f.: (1+x)^3/(1-x)^2;
a(n) = 8n - 4 + 4*C(0, n) + C(1, n);
a(n) = C(n+1, n) + 3*C(n, n-1) + 3*C(n-1, n-2) + C(n-2, n-3). (End)
a(n) = A017113(n-1), n > 1. - R. J. Mathar, Sep 12 2008

A146363 a(n) = smallest prime p such that continued fraction of (1 + sqrt(p))/2 has period length n.

Original entry on oeis.org

5, 2, 17, 7, 41, 19, 89, 31, 73, 43, 541, 103, 421, 179, 193, 191, 521, 139, 241, 151, 337, 491, 433, 271, 929, 211, 409, 487, 673, 379, 937, 463, 601, 331, 769, 1439, 2297, 619, 1033, 1399, 1777, 571, 1753, 823, 1993, 739, 1249, 631, 4337, 1051, 1321, 751, 1201
Offset: 1

Views

Author

Artur Jasinski, Oct 30 2008

Keywords

Crossrefs

Programs

  • Maple
    A := proc(n) option remember ; local c; try c := numtheory[cfrac](1/2+sqrt(n)/2,'periodic,quotients') ; RETURN(nops(c[2]) ); catch: RETURN(-1) end try ; end: A146363 := proc(n) local p,i ; for i from 1 do p := ithprime(i) ; if A(p) = n then RETURN(p) ; fi; od; end: for n from 1 do printf("%d, ",A146363(n)) ; od: # R. J. Mathar, Nov 08 2008
  • Mathematica
    $MaxExtraPrecision = 300; s = 10; aa = {}; Do[k = ContinuedFraction[(1 + Sqrt[n])/2, 1000]; If[Length[k] < 190, AppendTo[aa, 0], m = 1; While[k[[s ]] != k[[s + m]] || k[[s + m]] != k[[s + 2 m]] || k[[s + 2 m]] != k[[s + 3 m]] || k[[s + 3 m]] != k[[s + 4 m]], m++ ]; s = s + 1; While[k[[s ]] != k[[s + m]] || k[[s + m]] != k[[s + 2 m]] || k[[s + 2 m]] != k[[s + 3 m]] || k[[s + 3 m]] != k[[s + 4 m]], m++ ]; AppendTo[aa, m]], {n, 1, 1200}]; Print[aa]; bb = {}; Do[k = 1; yes = 0&&PeimeQ[k]; Do[If[aa[[k]] == n && yes == 0, AppendTo[bb, k]; yes = 1], {k, 1, Length[aa]}], {n, 1, 22}]; bb (* Artur Jasinski *)
    aa = {}; Do[n = 1; While[m != Length[ContinuedFraction[(1 + Sqrt[Prime[n]])/2][[2]]], n++ ]; AppendTo[aa, Prime[n]], {m, 1, 100}]; aa (* Artur Jasinski, Feb 03 2010 *)

Extensions

a(25) replaced by 929 and extended by R. J. Mathar, Nov 08 2008

A146335 Numbers k such that continued fraction of (1 + sqrt(k))/2 has period 11.

Original entry on oeis.org

265, 541, 593, 661, 701, 857, 1061, 1109, 1217, 1237, 1709, 1733, 1949, 2333, 2509, 2557, 2957, 3125, 3229, 3677, 3701, 4181, 4373, 4685, 5081, 5237, 5309, 6133, 6425, 6445, 7013, 7025, 8185, 8545, 8693, 9305, 9533, 9553, 10333, 10525, 10853, 10961, 11125, 11141
Offset: 1

Views

Author

Artur Jasinski, Oct 30 2008

Keywords

Comments

For primes in this sequence see A146356.

Examples

			a(4) = 661 because continued fraction of (1+sqrt(661))/2 = 13, 2, 1, 4, 2, 8, 8, 2, 4, 1, 2, 25, 2, 1, 4, 2, 8, 8, 2, 4, 1, 2, 25, 2, 1, 4, 2, 8, 8, 2, 4, 1, 2, 25, 2, 1, 4, 2, 8, 8 ... has period (2, 1, 4, 2, 8, 8, 2, 4, 1, 2, 25) length 11.
		

Crossrefs

Programs

  • Maple
    A146326 := proc(n) if not issqr(n) then numtheory[cfrac]( (1+sqrt(n))/2, 'periodic','quotients') ; nops(%[2]) ; else 0 ; fi; end: isA146335 := proc(n) RETURN(A146326(n) = 11) ; end: for n from 2 to 2000 do if isA146335(n) then printf("%d,",n) ; fi; od: # R. J. Mathar, Sep 06 2009
  • Mathematica
    Select[Range[10^4], !IntegerQ @ Sqrt[#] && Length[ContinuedFraction[(1 + Sqrt[#])/2][[2]]] == 11 &]  (* Amiram Eldar, Mar 31 2020 *)

Extensions

916 removed by R. J. Mathar, Sep 06 2009
More terms from Amiram Eldar, Mar 31 2020

A146362 Primes p such that continued fraction of (1 + sqrt(p))/2 has period 17 : primes in A146340.

Original entry on oeis.org

521, 617, 709, 1433, 1597, 2549, 2909, 3581, 3821, 4013, 4649, 5501, 5693, 5813, 6197, 7853, 8093, 8573, 9281, 9677, 10597, 10973, 11273, 13109, 13613, 15413, 15641, 15737, 16001, 16477, 17093, 20261, 22637, 24697, 26717, 32413, 35537, 38177, 43717, 46649, 47681
Offset: 1

Views

Author

Artur Jasinski, Oct 30 2008

Keywords

Crossrefs

Programs

  • Mathematica
    Select[Range[2*10^4], PrimeQ[#] && Length[ContinuedFraction[(1+Sqrt[#])/2][[2]]] == 17 &] (* Amiram Eldar, Mar 30 2020 *)

Extensions

Period length in definition corrected, 2579, 5003 removed, 5813 inserted by R. J. Mathar, Sep 06 2009
More terms from Amiram Eldar, Mar 30 2020

A143577 Numbers k such that the continued fraction of (1 + sqrt(k))/2 has period 9.

Original entry on oeis.org

73, 97, 233, 277, 349, 353, 613, 821, 877, 1073, 1181, 1189, 1277, 1285, 1313, 1385, 1613, 1637, 1693, 1745, 1865, 2357, 2581, 2777, 3233, 3557, 3989, 4157, 4469, 4517, 4553, 4709, 4889, 4925, 4933, 5245, 5261, 5305, 5597, 6113, 6205, 6253, 7213, 7585, 7837, 8885
Offset: 1

Views

Author

Artur Jasinski, Oct 30 2008

Keywords

Comments

For primes in this sequence see A146354.
Superset of A146354. - R. J. Mathar, Nov 05 2008

Examples

			a(1) = 73 because continued fraction of (1+sqrt(73))/2 = 4, 1, 3, 2, 1, 1, 2, 3, 1, 7, 1, 3, 2, 1, 1, 2, 3, 1, 7, 1, 3, 2, 1, 1, 2, 3, 1, 7, 1, 3, ... has period (1, 3, 2, 1, 1, 2, 3, 1, 7) length 9 .
		

Crossrefs

Programs

  • Maple
    isA143577 := proc(k) local c; try c := numtheory[cfrac](1/2+sqrt(k)/2,'periodic','quotients') ; if nops(c[2]) = 9 then RETURN(true) ; else RETURN(false) ; fi; catch: RETURN(false) ; end try; end: for k from 2 to 80000 do if isA143577(k) then printf("%d, ",k) ; fi; od: # R. J. Mathar, Nov 05 2008
  • Mathematica
    Select[Range[1000], !IntegerQ @ Sqrt[#] && Length[ContinuedFraction[(1 + Sqrt[#])/2][[2]]] == 9 &]  (* Amiram Eldar, Mar 19 2020 *)

Extensions

Extended by R. J. Mathar, Nov 05 2008
More terms from Amiram Eldar, Mar 19 2020

A146327 Numbers k such that the continued fraction of (1 + sqrt(k))/2 has period 2.

Original entry on oeis.org

2, 3, 10, 11, 12, 15, 21, 26, 27, 30, 35, 45, 50, 51, 56, 63, 77, 82, 83, 84, 87, 90, 93, 99, 117, 122, 123, 132, 143, 165, 170, 171, 182, 195, 221, 226, 227, 228, 230, 231, 235, 237, 240, 245, 255, 285, 290, 291, 306, 323, 357, 362, 363, 380, 399, 437, 442, 443
Offset: 1

Views

Author

Artur Jasinski, Oct 30 2008

Keywords

Comments

For primes in this sequence see A056899, primes of the form k^2 + 2.

Examples

			a(1) = 2 because continued fraction of (1 + sqrt(2))/2 = 1, 4, 1, 4, 1, 4, 1, ... has repeating part (1,4), period 2.
		

Crossrefs

Programs

  • Maple
    A146326 := proc(n) if not issqr(n) then numtheory[cfrac]( (1+sqrt(n))/2, 'periodic','quotients') ; nops(%[2]) ; else 0 ; fi; end: isA146327 := proc(n) RETURN(A146326(n) = 2) ; end: for n from 2 to 450 do if isA146327(n) then printf("%d,",n) ; fi; od: # R. J. Mathar, Sep 06 2009
  • Mathematica
    Select[Range[1000], 2 == Length[ContinuedFraction[(1 + Sqrt[#])/2][[2]]] &]

Extensions

226, 227, 290, 291 added by R. J. Mathar, Sep 06 2009

A146328 Numbers k such that the continued fraction of (1 + sqrt(k))/2 has period 3.

Original entry on oeis.org

17, 37, 61, 65, 101, 145, 185, 197, 257, 317, 325, 401, 461, 485, 557, 577, 677, 773, 785, 901, 985, 1025, 1129, 1157, 1297, 1429, 1445, 1601, 1765, 1877, 1901, 1937, 2117, 2285, 2305, 2501, 2705, 2873, 2917, 3077, 3137, 3281, 3293, 3341, 3365, 3601, 3845, 4045, 4097, 4357, 4597, 4625, 4901
Offset: 1

Views

Author

Artur Jasinski, Oct 30 2008

Keywords

Comments

For primes in this sequence see A146348.

Examples

			a(1) = 3 because continued fraction of (1+sqrt(17))/2 = 2, 1, 1, 3, 1, 1, 3, ... has period (1,1,3) length 3.
		

Crossrefs

Programs

  • Maple
    A146326 := proc(n) if not issqr(n) then numtheory[cfrac]( (1+sqrt(n))/2, 'periodic','quotients') ; nops(%[2]) ; else 0 ; fi; end: isA146328 := proc(n) RETURN(A146326(n) = 3) ; end: for n from 2 to 1801 do if isA146328(n) then printf("%d,",n) ; fi; od: # R. J. Mathar, Sep 06 2009
  • Mathematica
    okQ[n_] := Module[{cf = ContinuedFraction[(1 + Sqrt[n])/2]}, Length[cf] > 1 && Length[cf[[2]]] == 3]; Select[Range[5000], okQ]

Extensions

803 removed by R. J. Mathar, Sep 06 2009
Extended by T. D. Noe, Mar 09 2011

A146330 Numbers k such that continued fraction of (1 + sqrt(k))/2 has period 5.

Original entry on oeis.org

41, 149, 157, 181, 269, 397, 425, 493, 565, 697, 761, 941, 1013, 1037, 1325, 1565, 1781, 1825, 2081, 2153, 2165, 2173, 2465, 2477, 2693, 2725, 3181, 3221, 3533, 3869, 4253, 4409, 5165, 5213, 5273, 5297, 5741, 5837, 6485, 6757, 6949, 7045, 7325, 7465, 8021, 8069
Offset: 1

Views

Author

Artur Jasinski, Oct 30 2008

Keywords

Comments

For primes in this sequence see A146350.

Examples

			a(1) = 41 because continued fraction of (1+sqrt(41))/2 = 3, 1, 2, 2, 1, 5, 1, 2, 2, 1, 5, 1, 2, 2, 1, 5, 1, 2, ... has period (1,2,2,1,5) length 5.
		

Crossrefs

Programs

  • Maple
    isA146330 := proc(n) RETURN(A146326(n) = 5) ; end:
    for n from 2 to 2000 do if isA146330(n) then printf("%d,",n) ; fi; od: # R. J. Mathar, Sep 06 2009
  • Mathematica
    Select[Range[10^4], !IntegerQ @ Sqrt[#] && Length[ContinuedFraction[(1 + Sqrt[#])/2][[2]]] == 5 &]  (* Amiram Eldar, Mar 31 2020 *)

Extensions

259 and 1026 removed by R. J. Mathar, Sep 06 2009
More terms from Amiram Eldar, Mar 31 2020

A146331 Numbers k such that continued fraction of (1 + sqrt(k))/2 has period 6.

Original entry on oeis.org

18, 19, 22, 38, 39, 44, 54, 57, 58, 59, 66, 68, 70, 74, 86, 102, 105, 107, 111, 112, 114, 115, 130, 131, 146, 147, 148, 150, 159, 164, 175, 178, 183, 186, 187, 198, 203, 253, 258, 260, 264, 267, 273, 275, 278, 294, 303, 308, 309, 326, 327, 330, 333, 341, 346
Offset: 1

Views

Author

Artur Jasinski, Oct 30 2008

Keywords

Comments

For primes in this sequence see A146351.

Examples

			a(2) = 19 because continued fraction of (1+sqrt(19))/2 = 2, 1, 2, 8, 2, 1, 3, 1, 2, 8, 2, 1, 3, 1, 2, 8, 2, 1, 3, 1, 2, 8, 2, 1, 3, 1, 2, 8, 2, 1 ... has period (1, 2, 8, 2, 1, 3) length 6.
		

Crossrefs

Programs

  • Maple
    A146326 := proc(n) if not issqr(n) then numtheory[cfrac]( (1+sqrt(n))/2, 'periodic','quotients') ; nops(%[2]) ; else 0 ; fi; end: isA146331 := proc(n) RETURN(A146326(n) = 6) ; end: for n from 2 to 380 do if isA146331(n) then printf("%d,",n) ; fi; od: # R. J. Mathar, Sep 06 2009
  • Mathematica
    cf6Q[n_]:=Module[{c=(1+Sqrt[n])/2},!IntegerQ[c]&&Length[ContinuedFraction[ c][[2]]]==6]; Select[Range[400],cf6Q] (* Harvey P. Dale, May 30 2012 *)

Extensions

39, 68, 150, 203, etc. added by R. J. Mathar, Sep 06 2009
Previous Showing 11-20 of 52 results. Next