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.

User: Edwin McCravy

Edwin McCravy's wiki page.

Edwin McCravy has authored 4 sequences.

A377207 Number of n-digit numbers where every digit is either a 9 or adjacent to a 9.

Original entry on oeis.org

1, 18, 99, 342, 2691, 13788, 65709, 407772, 2115981, 11108358, 63181719, 334551402, 1802963871, 9931645728, 53256984129, 288681869232, 1572458030361, 8484410567898, 46019764248939, 249748559819262, 1351163694059451, 7326501636596868, 39716608228492149, 215099382176679492
Offset: 1

Author

Edwin McCravy, Oct 19 2024

Keywords

Comments

The 9 in the definition can also be any other nonzero digit.

Examples

			The a(1) = 1 number is 9.
The a(2) = 18 numbers are 19, 29, 39, 49, 59, 69, 79, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99.
		

Programs

  • PARI
    Vec((1 + 8*x)*(1 + 9*x)/(1 - x - 9*x^2 - 81*x^3) + O(x^25)) \\ Andrew Howroyd, Oct 20 2024

Formula

G.f.: x*(1 + 8*x)*(1 + 9*x)/(1 - x - 9*x^2 - 81*x^3). - Andrew Howroyd, Oct 20 2024

Extensions

a(9) onwards from Andrew Howroyd, Oct 20 2024

A276764 1^2 + 3^2, 2^2 + 4^2, 5^2 + 7^2, 6^2 + 8^2, ...

Original entry on oeis.org

10, 20, 74, 100, 202, 244, 394, 452, 650, 724, 970, 1060, 1354, 1460, 1802, 1924, 2314, 2452, 2890, 3044, 3530, 3700, 4234, 4420, 5002, 5204, 5834, 6052, 6730, 6964, 7690, 7940, 8714, 8980, 9802, 10084, 10954, 11252, 12170, 12484, 13450, 13780, 14794, 15140
Offset: 1

Author

Edwin McCravy, Nov 06 2016

Keywords

Crossrefs

Cf. A001844.

Programs

  • Mathematica
    LinearRecurrence[{1,2,-2,-1,1},{10,20,74,100,202},50] (* Harvey P. Dale, Mar 02 2023 *)
  • PARI
    Vec(2*x*(5+5*x+17*x^2+3*x^3+2*x^4) / ((1-x)^3*(1+x)^2) + O(x^60)) \\ Colin Barker, Nov 10 2016

Formula

a(n) = (2n - 1 - ((n+1) mod 2))^2 + (2n + (n mod 2))^2.
From Colin Barker, Nov 10 2016: (Start)
G.f.: 2*x*(5 + 5*x + 17*x^2 + 3*x^3 + 2*x^4) / ((1 - x)^3 * (1 + x)^2).
a(n) = a(n-1) + 2*a(n-2) - 2*a(n-3) - a(n-4) + a(n-5) for n>5.
a(n) = 8*n^2 - 8*n + 4 for n even.
a(n) = 8*n^2 + 2 for n odd.
(End)

A258340 a(n) = (7^n + 3^n - 2)/8.

Original entry on oeis.org

1, 7, 46, 310, 2131, 14797, 103216, 721420, 5046661, 35316787, 247187986, 1730227330, 12111325591, 84778481977, 593446982356, 4154121702040, 29078830390921, 203551748166367, 1424862043454326, 9974033723049550, 69818234317954651, 488727634995505957
Offset: 1

Author

Edwin McCravy, Aug 05 2015

Keywords

Comments

This sequence appeared on an test given to job interviewers.

Crossrefs

Cf. A074608.

Programs

Formula

a(n) = (A074608(n) - 2)/8. - Michel Marcus, Aug 20 2015
G.f.: x*(1-4*x)/((1-x)*(1-3*x)*(1-7*x)). - Vincenzo Librandi, Aug 22 2015
a(n) = 11*a(n-1) - 31*a(n-2) + 21*a(n-3) with n>2, a(0)=0. - Bruno Berselli, Aug 24 2015
a(n) = Sum_{k=1..n} A027907(n,2k)*4^(k-1) . - J. Conrad, Aug 30 2016

A252729 Start with 1, add 1, subtract 2, multiply by 3, add 4, subtract 5, multiply by 6, add 7, etc.

Original entry on oeis.org

1, 2, 0, 0, 4, -1, -6, 1, -7, -63, -53, -64, -768, -755, -769, -11535, -11519, -11536, -207648, -207629, -207649, -4360629, -4360607, -4360630, -104655120, -104655095, -104655121, -2825688267, -2825688239, -2825688268, -84770648040, -84770648009
Offset: 1

Author

Edwin McCravy, Dec 20 2014

Keywords

Programs

  • Maple
    A252729 := proc(n)
        option remember;
        if n =1 then
            1;
        elif modp(n,3) = 2 then
            procname(n-1)+n-1;
        elif modp(n,3) = 0 then
            procname(n-1)-(n-1);
        elif modp(n,3) = 1 then
            procname(n-1)*(n-1);
        fi ;
    end proc:
    seq(A252729(n),n=1..32) ; # R. J. Mathar, Mar 20 2015
  • Mathematica
    nxt[{n_,a_}]:={n+1,Which[Mod[n+1,3]==1,a+n+1,Mod[n+1,3]==2,a-(n+1),True, a*(n+1)]}; Transpose[NestList[nxt,{0,1},35]][[2]] (* Harvey P. Dale, Mar 29 2015 *)