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 31-40 of 384 results. Next

A195586 G.f.: exp( Sum_{n>=1} A163659(n^2)*x^n/n ), where x*exp(Sum_{n>=1} A163659(n)*x^n/n) = S(x) is the g.f. of Stern's diatomic series (A002487).

Original entry on oeis.org

1, 1, 4, 3, 15, 12, 37, 25, 100, 75, 219, 144, 501, 357, 972, 615, 1995, 1380, 3665, 2285, 7052, 4767, 12255, 7488, 22305, 14817, 37524, 22707, 65775, 43068, 106837, 63769, 180436, 116667, 286251, 169584, 471173, 301589, 729404, 427815, 1169211, 741396, 1778545, 1037149
Offset: 0

Views

Author

Paul D. Hanna, Sep 20 2011

Keywords

Examples

			G.f.: A(x) = 1 + x + 4*x^2 + 3*x^3 + 15*x^4 + 12*x^5 + 37*x^6 + 25*x^7 +...
where
log(A(x)) = x + 7*x^2/2 - 2*x^3/3 + 31*x^4/4 + x^5/5 - 14*x^6/6 + x^7/7 + 127*x^8/8 +...+ A195587(n)*x^n/n +...
Let C(x) be the odd bisection of g.f. A(x):
C(x) = 1 + 3*x + 12*x^2 + 25*x^3 + 75*x^4 + 144*x^5 + 357*x^6 + 615*x^7 + 1380*x^8 + 2285*x^9 + 4767*x^10 + 7488*x^11 + 14817*x^12 +...+ A237650(n)*x^n +...
then C(x) equals the cube of an integer series:
C(x)^(1/3) = 1 + x + 3*x^2 + 2*x^3 + 9*x^4 + 7*x^5 + 17*x^6 + 10*x^7 + 41*x^8 + 31*x^9 + 75*x^10 + 44*x^11 + 150*x^12 +...+ A237651(n)*x^n +...
which equals A(x)/C(x^2)^(1/3).
The g.f. may be expressed by the product:
A(x) = (1+x+x^2) * (1+x^2+x^4)^3 * (1+x^4+x^8)^6 * (1+x^8+x^16)^12 * (1+x^16+x^32)^24 *...* (1 + x^(2*2^n) + x^(4*2^n))^(3*2^n) *...
		

Crossrefs

Programs

  • PARI
    {A163659(n)=if(n<1,0,if(n%3,1,-2)*sigma(2^valuation(n,2)))}
    {a(n)=polcoeff(exp(sum(k=1, n, A163659(k^2)*x^k/k)+x*O(x^n)), n)}
    for(n=0,50,print1(a(n),", "))
    
  • PARI
    /* G.f.: A(x) = (1+x+x^2) * (1+x^2+x^4) * A(x^2)^2: */
    {a(n)=local(A=1+x); for(i=1, #binary(n), A=(1+x+x^2)*(1+x^2+x^4)*subst(A^2, x, x^2) +x*O(x^n)); polcoeff(A, n)}
    for(n=0, 50, print1(a(n), ", "))
    
  • PARI
    /* G.f.: (1+x+x^2) * Product_{n>=0} (1 + x^(2*2^n) + x^(4*2^n))^(3*2^n): */
    {a(n)=local(A=1+x); A=(1+x+x^2)*prod(k=0, #binary(n), (1+x^(2*2^k)+x^(4*2^k)+x*O(x^n))^(3*2^k)); polcoeff(A, n)}
    for(n=0, 50, print1(a(n), ", "))

Formula

G.f.: exp( Sum_{n>=1} A195587(n)*x^n/n ), where A195587(n) = A163659(n^2).
G.f. A(x) satisfies:
(1) A(x) = (1+x+x^2) * (1+x^2+x^4) * A(x^2)^2.
(2) A(x) = (1+x+x^2) * Product_{n>=0} ( 1 + x^(2*2^n) + x^(4*2^n) )^(3*2^n).
(3) A(x) / A(-x) = (1+x+x^2) / (1-x+x^2).
Bisections: let A(x) = B(x^2) + x*C(x^2), then
(4) B(x) = (1+x) * C(x).
(5) C(x) = (1+x+x^2)^3 * C(x^2)^2.
(6) A(x) = (1+x+x^2) * C(x^2).
(7) A(x)^3 = C(x) * C(x^2).
(8) A(x)^2 = C(x) / (1+x+x^2).
(9) A(x) = ( C(x)/A(x) - C(x^2)^2/A(x^2)^2 ) / (2*x).

Extensions

Entry and formulas revised by Paul D. Hanna, May 04 2014

A244472 2nd-largest term in n-th row of Stern's diatomic triangle A002487.

Original entry on oeis.org

1, 2, 4, 7, 12, 19, 31, 50, 81, 131, 212, 343, 555, 898, 1453, 2351, 3804, 6155, 9959, 16114, 26073, 42187, 68260, 110447, 178707, 289154, 467861, 757015, 1224876, 1981891, 3206767, 5188658, 8395425, 13584083, 21979508, 35563591, 57543099
Offset: 1

Views

Author

N. J. A. Sloane, Jul 01 2014

Keywords

Crossrefs

Cf. A002487, A013655, A100545 (bisection).

Programs

  • Magma
    I:=[1, 2, 4, 7, 12]; [n le 5 select I[n] else Self(n-1)+Self(n-2): n in [1..40]]; // Wesley Ivan Hurt, Jul 10 2015
  • Maple
    A244472 := proc(n)
        if n < 4 then
            op(n,[1,2,4]) ;
        else
            combinat[fibonacci](n+2)-combinat[fibonacci](n-3) ;
        end if;
    end proc:
    seq(A244472(n),n=1..50) ; # R. J. Mathar, Jul 05 2014
  • Mathematica
    CoefficientList[Series[-(x^4 + x^3 + x^2 + x + 1)/(x^2 + x - 1), {x, 0, 50}], x] (* Wesley Ivan Hurt, Jul 10 2015 *)
    Join[{1, 2, 4}, LinearRecurrence[{1, 1}, {7, 12}, 50]] (* Vincenzo Librandi, Jul 11 2015 *)
  • PARI
    Vec(-x*(x^4+x^3+x^2+x+1)/(x^2+x-1) + O(x^100)) \\ Colin Barker, Jul 10 2015
    

Formula

a(n) = A013655(n-1), n>3.
a(n) = a(n-1)+a(n-2), n>5. - Colin Barker, Jul 10 2015
G.f.: -x*(x^4+x^3+x^2+x+1) / (x^2+x-1). - Colin Barker, Jul 10 2015

A244473 3rd-largest term in n-th row of Stern's diatomic triangle A002487.

Original entry on oeis.org

1, 3, 5, 11, 18, 30, 49, 80, 129, 209, 338, 547, 885, 1432, 2317, 3749, 6066, 9815, 15881, 25696, 41577, 67273, 108850, 176123, 284973, 461096, 746069, 1207165, 1953234, 3160399, 5113633, 8274032, 13387665, 21661697, 35049362, 56711059, 91760421
Offset: 2

Views

Author

N. J. A. Sloane, Jul 01 2014

Keywords

Crossrefs

Programs

  • Maple
    A244473 := proc(n)
        if n < 8 then
            op(n,[-1,1,3,5,11,18,30]) ;
        else
            combinat[fibonacci](n+1)+5*combinat[fibonacci](n-4) ;
        end if;
    end proc:
    seq(A244473(n),n=2..50) ; # R. J. Mathar, Jul 05 2014
  • Mathematica
    Join[{1,3,5,11,18,30},LinearRecurrence[{1,1},{49,80},40]] (* Harvey P. Dale, Jan 13 2015 *)
  • PARI
    Vec(-x^2*(x^7+x^6+x^5+2*x^4+3*x^3+x^2+2*x+1)/(x^2+x-1) + O(x^100)) \\ Colin Barker, Jul 10 2015

Formula

a(n) = a(n-1)+a(n-2) for n>9. - Colin Barker, Jul 10 2015
G.f.: -x^2*(x^7+x^6+x^5+2*x^4+3*x^3+x^2+2*x+1) / (x^2+x-1). - Colin Barker, Jul 10 2015

A244476 6th-largest term in n-th row of Stern's diatomic triangle A002487.

Original entry on oeis.org

2, 8, 15, 26, 45, 75, 121, 199, 322, 542, 877, 1427, 2309, 3739, 6050, 9790, 15841, 25632, 41473, 67105, 108578, 175683, 284261, 459944, 744205, 1204149, 1948354, 3152503, 5100857, 8253360
Offset: 4

Views

Author

N. J. A. Sloane, Jul 01 2014

Keywords

Crossrefs

Programs

  • Python
    from functools import reduce
    from itertools import product
    def A244476(n): return sorted(set(sum(reduce(lambda x,y:(x[0],x[0]+x[1]) if y else (x[0]+x[1],x[1]),k,(1,0))) for k in product((False,True),repeat=n)),reverse=True)[5] # Chai Wah Wu, Jun 19 2022

Extensions

a(24)-a(33) from Chai Wah Wu, Jun 19 2022

A266405 Start with a(1) = 1, then always choose for a(n) the least unused number such that A002487(a(n)*a(n-1)) = A002487(a(n)) * A002487(a(n-1)), where A002487 is Stern-Brocot sequence.

Original entry on oeis.org

1, 2, 3, 4, 5, 7, 8, 6, 9, 10, 14, 16, 11, 17, 13, 12, 18, 15, 26, 24, 23, 19, 32, 20, 28, 34, 22, 27, 33, 29, 31, 25, 45, 49, 36, 30, 52, 48, 35, 64, 21, 69, 42, 128, 37, 256, 38, 46, 66, 54, 41, 83, 82, 108, 44, 39, 88, 68, 56, 40, 55, 65, 47, 130, 59, 96, 51, 192, 70, 72, 60, 104, 71, 80, 57, 63, 61, 126, 98, 90, 50, 62, 58, 124, 100, 121, 127
Offset: 1

Views

Author

Antti Karttunen, Dec 29 2015

Keywords

Comments

This is a permutation of natural numbers for the same reason that A266195 and A266351 are. If nothing else works for the value of next a(n), then at least the next unused power of 2 will save the sequence from dying, and will also immediately pick up as its succeeding pair the least term not used so far. This follows because A002487(2^m) = 1 and A002487(2^m * n) = A002487(n) for all n and m.
Still, it would be nice to know when 149 will appear in the sequence.

Crossrefs

Inverse: A266406.
Cf. A002487.
Cf. A266195, A266351, A265405 (for sequences with similar definitions).

A284007 a(n) = a(a(n-A002487(n))) + a(n-a(n-A002487(n))) with a(1) = a(2) = 1, where A002487 = Stern-Brocot sequence.

Original entry on oeis.org

1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 7, 7, 7, 8, 8, 9, 10, 11, 11, 11, 12, 12, 14, 13, 14, 14, 15, 16, 15, 16, 16, 18, 18, 18, 19, 19, 20, 20, 22, 22, 24, 23, 25, 24, 25, 25, 25, 26, 26, 27, 27, 28, 29, 28, 30, 29, 30, 31, 30, 32, 34, 34, 33, 33, 34, 34, 36, 37, 36, 37, 38, 38, 40, 41, 39, 40, 43, 42, 44, 43, 43, 44, 44, 45, 45, 45, 50
Offset: 1

Views

Author

Antti Karttunen, Mar 23 2017

Keywords

Crossrefs

Formula

a(1) = a(2) = 1, for n > 2, a(n) = a(a(A284013(n))) + a(n-a(A284013(n))).

A317838 a(n) = Sum_{d|n} A002487(d).

Original entry on oeis.org

1, 2, 3, 3, 4, 6, 4, 4, 7, 8, 6, 9, 6, 8, 10, 5, 6, 14, 8, 12, 14, 12, 8, 12, 11, 12, 15, 12, 8, 20, 6, 6, 14, 12, 16, 21, 12, 16, 18, 16, 12, 28, 14, 18, 26, 16, 10, 15, 13, 22, 20, 18, 14, 30, 20, 16, 20, 16, 12, 30, 10, 12, 24, 7, 16, 28, 12, 18, 24, 32, 14, 28, 16, 24, 35, 24, 26, 36, 14, 20, 29, 24, 20, 42, 30, 28, 28, 24
Offset: 1

Views

Author

Antti Karttunen, Aug 09 2018

Keywords

Comments

Inverse Möbius transform of A002487, Stern's Diatomic sequence.

Crossrefs

Programs

  • PARI
    A002487(n) = { my(a=1, b=0); while(n>0, if(bitand(n, 1), b+=a, a+=b); n>>=1); (b); }; \\ From A002487
    A317838(n) = sumdiv(n,d,A002487(d));

Formula

a(n) = Sum_{d|n} A002487(d).
a(n) = A317837(n) + A002487(n).

A331600 a(n) = A002487(A331595(n)).

Original entry on oeis.org

1, 1, 1, 2, 1, 2, 1, 3, 2, 2, 1, 3, 1, 2, 4, 3, 1, 4, 1, 3, 4, 2, 1, 3, 2, 2, 3, 3, 1, 4, 1, 5, 4, 2, 4, 3, 1, 2, 4, 3, 1, 4, 1, 3, 7, 2, 1, 5, 2, 12, 4, 3, 1, 3, 8, 3, 4, 2, 1, 3, 1, 2, 7, 5, 8, 4, 1, 3, 4, 12, 1, 5, 1, 2, 4, 3, 4, 4, 1, 5, 3, 2, 1, 3, 8, 2, 4, 3, 1, 3, 8, 3, 4, 2, 8, 5, 1, 16, 7, 3, 1, 4, 1, 3, 18
Offset: 1

Views

Author

Antti Karttunen, Jan 22 2020

Keywords

Crossrefs

Programs

  • Mathematica
    Array[If[# == 1, 1, NestWhile[If[OddQ[#3], {#1, #1 + #2, #4}, {#1 + #2, #2, #4}] & @@ Append[#, Floor[#[[-1]]/2]] &, {1, 0, #}, #[[-1]] > 0 &][[2]] &@ Apply[GCD, {Block[{k = #, m = 0}, Times @@ Power @@@ Table[k -= m; k = DeleteCases[k, 0]; {Prime@ Length@ k, m = Min@ k}, Length@ Union@ k]] &@ Catenate[ConstantArray[PrimePi[#1], #2] & @@@ #], Function[t, Times @@ Prime@ Accumulate[If[Length@ t < 2, {0}, Join[{1}, ConstantArray[0, Length@ t - 2], {-1}]] + ReplacePart[t, Map[#1 -> #2 & @@ # &, #]]]]@ ConstantArray[0, Transpose[#][[1, -1]]] &[# /. {p_, e_} /; p > 0 :> {PrimePi@ p, e}]}] &@ FactorInteger[#]] &, 105] (* Michael De Vlieger, Jan 25 2020, after JungHwan Min at A122111 *)
  • PARI
    A002487(n) = { my(a=1, b=0); while(n>0, if(bitand(n, 1), b+=a, a+=b); n>>=1); (b); }; \\ From A002487
    A064989(n) = {my(f); f = factor(n); if((n>1 && f[1,1]==2), f[1,2] = 0); for (i=1, #f~, f[i,1] = precprime(f[i,1]-1)); factorback(f)};
    A122111(n) = if(1==n,n,prime(bigomega(n))*A122111(A064989(n)));
    A241909(n) = if(1==n||isprime(n),2^primepi(n),my(f=factor(n),h=1,i,m=1,p=1,k=1); while(k<=#f~, p = nextprime(1+p); i = primepi(f[k,1]); m *= p^(i-h); h = i; if(f[k,2]>1, f[k,2]--, k++)); (p*m));
    A331595(n) = gcd(A122111(n), A241909(n));
    A331600(n) = A002487(A331595(n));

Formula

a(n) = A002487(A331595(n)) = A002487(gcd(A122111(n), A241909(n))).
a(n) = A002487(A331731(n)).

A331743 Lexicographically earliest infinite sequence such that a(i) = a(j) => A002487(i) = A002487(j) and A323901(i) = A323901(j) for all i, j.

Original entry on oeis.org

1, 2, 2, 3, 2, 4, 3, 5, 2, 6, 4, 7, 3, 8, 5, 9, 2, 10, 6, 11, 4, 12, 7, 13, 3, 14, 8, 15, 5, 16, 9, 17, 2, 18, 10, 19, 6, 20, 11, 21, 4, 22, 12, 23, 7, 24, 13, 25, 3, 26, 14, 27, 8, 28, 15, 29, 5, 30, 16, 31, 9, 32, 17, 33, 2, 34, 18, 35, 10, 36, 19, 37, 6, 38, 20, 39, 11, 40, 21, 41, 4, 42, 22, 43, 12, 44, 23, 45, 7, 46, 24, 47, 13, 48, 25, 49, 3, 50, 26, 51, 14, 52, 27, 53, 8, 54
Offset: 0

Views

Author

Antti Karttunen, Feb 05 2020

Keywords

Comments

Restricted growth sequence transform of the ordered pair [A002487(n), A002487(A163511(n))].
For all i, j:
a(i) = a(j) => A331748(i) = A331748(j),
a(i) = a(j) => A331749(i) = A331749(j).

Crossrefs

Differs from A331745 for the first time at n=77, where a(77) = 40, while A331745(77) = 24.
Differs from A103391(1+n) for the first time at n=191, where a(191) = 23, while A103391(192) = 97.

Programs

  • PARI
    \\ Needs also code from A323901.
    up_to = 65537;
    rgs_transform(invec) = { my(om = Map(), outvec = vector(length(invec)), u=1); for(i=1, length(invec), if(mapisdefined(om,invec[i]), my(pp = mapget(om, invec[i])); outvec[i] = outvec[pp] , mapput(om,invec[i],i); outvec[i] = u; u++ )); outvec; };
    Aux331743(n) = [A002487(n), A323901(n)];
    v331743 = rgs_transform(vector(1+up_to, n, Aux331743(n-1)));
    A331743(n) = v331743[1+n];

Formula

a(2^n) = 2 for all n >= 0.

A135510 Least positive number missing from row n of Stern's diatomic array (see A049456 or A002487).

Original entry on oeis.org

2, 3, 4, 6, 6, 14, 20, 28, 38, 54, 90, 150, 216, 350, 506, 876, 1230, 2034, 3160, 4470, 7764, 12190, 18816, 29952, 43800, 73968, 112602, 182210, 285780, 474558, 729432, 1194078, 1843110, 2990880, 4662450, 7608720, 11801580, 18489120, 29790300
Offset: 1

Views

Author

mc (da-da(AT)lycos.de), Feb 09 2008

Keywords

Comments

The old definition was "Least numbers not generated by Eisenstein's algorithm: m=1 n=1, then insert between them m+n, at stage p=1. (E.g. next stage (p=2) of Eisenstein's algorithm would be m, m+m+n, m+n, m+n+n, n). The maximum of these symmetric row elements at stage p is fibonacci(p+2); but how to determine the first number not generated at stage p?"

Crossrefs

Programs

  • Maple
    A049456 := proc(n, k)
        option remember;
        if n =1 then
            if k >= 0 and k <=1 then
                1;
            else
                0 ;
            end if;
        elif type(k, 'even') then
            procname(n-1, k/2) ;
        else
            procname(n-1, (k+1)/2)+procname(n-1, (k-1)/2) ;
        end if;
    end proc: # R. J. Mathar, Dec 12 2014
    mex := proc(L)
            local k;
            for k from 1 do
                    if not k in L then
                            return k;
                    end if;
            end do:
    end proc:
    rho:=n->[seq(A049456(n,k),k=0..2^(n-1))];
    [seq(mex(rho(n)),n=1..16)]; # N. J. A. Sloane, Oct 14 2017
  • Mathematica
    (* T is A049456 *)
    T[n_, k_] := T[n, k] = If[n == 1, If[k >= 0 && k <= 1, 1, 0], If[EvenQ[k], T[n-1, k/2], T[n-1, (k+1)/2] + T[n-1, (k-1)/2]]];
    mex[L_] := Module[{k}, For[k = 1, True, k++, If[FreeQ[L, k], Return[k]]]];
    rho[n_] := Table[T[n, k], {k, 0, 2^(n-1)}];
    a[n_] := a[n] = mex[rho[n]];
    Table[Print[n, " ", a[n]]; a[n], {n, 1, 25}] (* Jean-François Alcover, Aug 03 2023, after Maple code *)

Extensions

Entry revised by N. J. A. Sloane, Oct 14 2017
a(29)-a(39) from Don Reble, Oct 16 2016
Previous Showing 31-40 of 384 results. Next