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

A105980 Near-repdigit primes with at least two 4's as the repeated digit.

Original entry on oeis.org

443, 449, 4441, 4447, 44449, 444443, 444449, 444444443, 4444444447, 44444444441, 444444444443, 44444444444444444447, 44444444444444444444444447, 4444444444444444444444444441, 444444444444444444444444444443
Offset: 1

Views

Author

Shyam Sunder Gupta, Apr 29 2005

Keywords

Examples

			a(2)=449 is a term because all digits are equal to 4 except one.
		

Crossrefs

Programs

  • Mathematica
    Select[Flatten[Table[FromDigits[PadLeft[{n},x,4]],{x,3,30},{n,{1,3,7,9}}]],PrimeQ] (* Harvey P. Dale, Feb 18 2018 *)

Extensions

More terms from Harvey P. Dale, Feb 18 2018
Name clarified by Robert Price, Sep 10 2023

A180147 Eight rooks and one berserker on a 3 X 3 chessboard. G.f.: (1 + 3*x)/(1 - 4*x - 3*x^2 + 6*x^3).

Original entry on oeis.org

1, 7, 31, 139, 607, 2659, 11623, 50827, 222223, 971635, 4248247, 18574555, 81213151, 355086787, 1552539271, 6788138539, 29679651247, 129767784979, 567381262423, 2480750497147, 10846539065983, 47424120180835
Offset: 0

Views

Author

Johannes W. Meijer, Aug 13 2010

Keywords

Comments

The a(n) represent the number of n-move routes of a fairy chess piece starting in the central square (m = 5) on a 3 X 3 chessboard. This fairy chess piece behaves like a rook on the eight side and corner squares but on the central square the rook goes berserk and turns into a berserker, see A180140.
On a 3 X 3 chessboard there are 2^9 = 512 ways to go berserk on the central square (we assume here that a berserker might behave like a rook). The berserker is represented by the A[5] vector in the fifth row of the adjacency matrix A, see the Maple program. For the central squares the 512 berserkers lead to 42 berserker sequences, see the cross-references for some examples.
The sequence above corresponds to six A[5] vectors with decimal values between 191 and 506. These vectors lead for the corner squares to A180145 and for the side squares to A180146.

Crossrefs

Cf. A180141 (corner squares), A180140 (side squares), A180147 (central square).
Cf. Berserker sequences central square [numerical values A[5]]: A000007 [0], A000012 [16], 2*A001835 [17, n>=1 and a(0)=1], A155116 [3], A077829 [7], A000302 [15], 6*A179606 [111, with leading 1 added], 2*A033887 [95, n>=1 and a(0)=1], A180147 [191, this sequence], 2*A180141 [495, n>=1 and a(0)=1], 4*A107979 [383, with leading 1 added].

Programs

  • Maple
    with(LinearAlgebra): nmax:=22; m:=5; A[5]:=[0,1,0,1,1,1,1,1,1]: A:= Matrix([[0,1,1,1,0,0,1,0,0], [1,0,1,0,1,0,0,1,0], [1,1,0,0,0,1,0,0,1], [1,0,0,0,1,1,1,0,0], A[5], [0,0,1,1,1,0,0,0,1], [1,0,0,1,0,0,0,1,1], [0,1,0,0,1,0,1,0,1], [0,0,1,0,0,1,1,1,0]]): for n from 0 to nmax do B(n):=A^n: a(n):= add(B(n)[m,k],k=1..9): od: seq(a(n), n=0..nmax);
  • Mathematica
    CoefficientList[Series[(1+3x)/(1-4x-3x^2+6x^3),{x,0,40}],x] (* or *) LinearRecurrence[{4,3,-6},{1,7,31},40] (* Harvey P. Dale, Oct 10 2011 *)

Formula

G.f.: (1+3*x)/(1 - 4*x - 3*x^2 + 6*x^3).
a(n) = 4*a(n-1) + 3*a(n-2) - 6*a(n-3) with a(0)=1, a(1)=7 and a(2)=31.
a(n) = -1/2 + (7+6*A)*A^(-n-1)/22 + (7+6*B)*B^(-n-1)/22 with A=(-3+sqrt(33))/12 and B=(-3-sqrt(33))/12.
a(n) = A180146(n) + 3*A180146(n-1) with A180146(-1) = 0.

A365592 Near-repdigit primes with at least two 1's as the repeated digit.

Original entry on oeis.org

113, 1117, 11113, 11117, 11119, 111119, 11111117, 11111119, 111111113, 11111111113, 11111111111111119, 1111111111111111111, 11111111111111111111111, 11111111111111111111117, 111111111111111111111113, 11111111111111111111111111117
Offset: 1

Views

Author

Robert Price, Sep 10 2023

Keywords

Examples

			1117 is a term because all digits are equal to 1 except the last one.
		

Crossrefs

A268409 a(n) = 4*a(n - 1) + 2*a(n - 2) for n>1, a(0)=3, a(1)=5.

Original entry on oeis.org

3, 5, 26, 114, 508, 2260, 10056, 44744, 199088, 885840, 3941536, 17537824, 78034368, 347213120, 1544921216, 6874111104, 30586286848, 136093369600, 605546052096, 2694370947584, 11988575894528, 53343045473280, 237349333682176, 1056083425675264
Offset: 0

Views

Author

Ilya Gutkovskiy, Feb 04 2016

Keywords

Comments

In general, the ordinary generating function for the recurrence relation b(n) = r*b(n - 1) + s*b(n - 2), with n>1 and b(0)=k, b(1)=m, is (k - (k*r - m)*x)/(1 - r*x - s*x^2). This recurrence gives the closed form b(n) = (2^(-n - 1)*((k*r - 2*m)*(r - sqrt(r^2 + 4*s))^n + (2*m - k*r)*(sqrt(r^2 + 4*s) + r)^n + k*sqrt(r^2 + 4*s)*(r - sqrt(r^2 + 4*s))^n + k*sqrt(r^2 + 4*s)*(sqrt(r^2 + 4*s) + r)^n))/sqrt(r^2 + 4*s).

Crossrefs

Programs

  • Magma
    [n le 2 select 2*n+1 else 4*Self(n-1)+2*Self(n-2): n in [1..30]]; // Vincenzo Librandi, Feb 04 2016
    
  • Mathematica
    RecurrenceTable[{a[0] == 3, a[1] == 5, a[n] == 4 a[n - 1] + 2 a[n - 2]}, a, {n, 23}]
    LinearRecurrence[{4, 2}, {3, 5}, 24]
    Table[((18 + Sqrt[6]) (2 - Sqrt[6])^n - (Sqrt[6] - 18) (2 + Sqrt[6])^n)/12, {n, 0, 23}]
  • PARI
    Vec((3 - 7*x)/(1 - 4*x - 2*x^2) + O(x^30)) \\ Michel Marcus, Feb 04 2016

Formula

G.f.: (3 - 7*x)/(1 - 4*x - 2*x^2).
a(n) = ((18 + sqrt(6))*(2 - sqrt(6))^n - (sqrt(6) - 18)*(2 + sqrt(6))^n)/12.
Lim_{n -> infinity} a(n + 1)/a(n) = 2 + sqrt(6) = A176213.
a(n) = 3*A090017(n+1) -7*A090017(n). - R. J. Mathar, Mar 12 2017
Showing 1-4 of 4 results.