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 22 results. Next

A094025 Expansion of (1+3x)/((1-x^2)(1-3x^2)).

Original entry on oeis.org

1, 3, 4, 12, 13, 39, 40, 120, 121, 363, 364, 1092, 1093, 3279, 3280, 9840, 9841, 29523, 29524, 88572, 88573, 265719, 265720, 797160, 797161, 2391483, 2391484, 7174452, 7174453, 21523359, 21523360, 64570080, 64570081, 193710243, 193710244
Offset: 0

Views

Author

Paul Barry, Apr 22 2004

Keywords

Comments

Add 1, triple, add 1, triple, ... (of course this is simply a restatement of one of Philippe Deléham's formulas). - Jon Perry, Aug 11 2014

Crossrefs

Formula

a(n)=4a(n-2)-3a(n-4); a(n)=3*3^(n/2)(1/4+sqrt(3)/4+(1/4-sqrt(3)/4)(-1)^n)+(-1)^n/2-1.
a(n) = a(n-1)*3 if n odd; a(n) = a(n-1)+1 if n even. - Philippe Deléham, Apr 22 2013
a(2n) = A003462(n+1); a(2n+1) = A123109(n+1) = A029858(n+1). - Philippe Deléham, Apr 22 2013

A295766 G.f. A(x) satisfies: [x^(n-1)] A(x)^(n^2)/n^2 = [x^(n-2)] A(x)^(n^2) for n>=2 with A'(0) = 1.

Original entry on oeis.org

1, 1, 5, 90, 3204, 170987, 12162683, 1087504130, 118227836360, 15304211345298, 2324856843115770, 409872125913866852, 83092182794794380856, 19214014336799266619671, 5030971580159960051721815, 1481724835890098667273954338, 487883202104697456579537247232, 178595806151469762148235569612814, 72312528698655521190143801630975174
Offset: 0

Views

Author

Paul D. Hanna, Jan 31 2018

Keywords

Comments

Compare g.f. to: [x^(n-1)] G(x)^(n^2)/n^2 = [x^(n-2)] G(x)^(n^2)/(n-1) for n>=2 holds when G(x) = exp(x).

Examples

			G.f.: A(x) = 1 + x + 5*x^2 + 90*x^3 + 3204*x^4 + 170987*x^5 + 12162683*x^6 + 1087504130*x^7 + 118227836360*x^8 + 15304211345298*x^9 + 2324856843115770*x^10 + ...
ILLUSTRATION OF THE DEFINITION.
The table of coefficients of x^k in A(x)^(n^2) begins:
n=1: [1, 1, 5, 90, 3204, 170987, 12162683, ...];
n=2: [1, 4, 26, 424, 14107, 729196, 50993674, ...];
n=3: [1, 9, 81, 1254, 37602, 1833597, 124332453, ...];
n=4: [1, 16, 200, 3200, 86084, 3846720, 248466736, ...];
n=5: [1, 25, 425, 7550, 188750, 7566705, 455263225, ...];
n=6: [1, 36, 810, 16680, 410499, 14777964, 808802730, ...];
n=7: [1, 49, 1421, 34594, 886312, 29473255, 1444189495, ...]; ...
in which the main diagonal
[1, 4, 81, 3200, 188750, 14777964, 1444189495, ...]
is related to an adjacent diagonal by dividing by n^2 like so:
[1, 4/4, 81/9, 3200/16, 188750/25, 14777964/36, 1444189495/49, ...]
= [1, 1, 9, 200, 7550, 410499, 29473255, ...].
Thus [x^(n-1)] A(x)^(n^2)/n^2 = [x^(n-2)] A(x)^(n^2) for n>=2.
		

Crossrefs

Programs

  • PARI
    {a(n) = my(A=[1],V); for(m=2,n+1, A=concat(A,0); V=Vec(Ser(A)^(m^2)); A[#A] = V[#A-1] - V[#A]/m^2 );A[n+1]}
    for(n=0,20,print1(a(n),", "))
    
  • PARI
    /* Informal method of obtaining N terms: */
    N=30; A=[1]; for(n=2,N, A=concat(A,0); V=Vec(Ser(A)^(n^2)); A[#A] = V[#A-1] - V[#A]/n^2 );A

Formula

a(A075427(k) - 1) is odd for n>=0 and a(n) is even elsewhere (conjecture).

A094026 Expansion of x(1+10x)/((1-x^2)(1-10x^2)).

Original entry on oeis.org

0, 1, 10, 11, 110, 111, 1110, 1111, 11110, 11111, 111110, 111111, 1111110, 1111111, 11111110, 11111111, 111111110, 111111111, 1111111110, 1111111111, 11111111110, 11111111111, 111111111110, 111111111111, 1111111111110
Offset: 0

Views

Author

Paul Barry, Apr 22 2004

Keywords

Comments

The expansion of x(1+kx)/((1-x^2)(1-kx^2)) has a(n)=k^((n+1)/2)/(2(sqrt(k)-1))-(-sqrt(k))^(n+1)/(2(sqrt(k)+1))-(-1)^n/2-(k+1)/(2(k-1)).
First 4 positive members are the divisors of 6 (the first perfect number), written in base 2 (see A135652, A135653, A135654, A135655). - Omar E. Pol, May 04 2008

Crossrefs

Programs

  • Magma
    I:=[0,1,10,11]; [n le 4 select I[n] else 11*Self(n-2)-10*Self(n-4): n in [1..30]]; // Vincenzo Librandi, Apr 25 2019
  • Mathematica
    LinearRecurrence[{0, 11, 0, -10}, {0, 1, 10, 11}, 30] (* Vincenzo Librandi, Apr 25 2019 *)
    CoefficientList[Series[x (1+10x)/((1-x^2)(1-10x^2)),{x,0,30}],x] (* Harvey P. Dale, Jul 07 2024 *)

Formula

a(n) = 10^(n/2)(5/9+sqrt(10)/18+(5/9-sqrt(10)/18)(-1)^n)-(-1)^n/2-11/18.

A097169 a(n) = Sum_{k=0..n} C(floor((n+1)/2),floor((k+1)/2)) * 3^k.

Original entry on oeis.org

1, 4, 13, 52, 133, 604, 1333, 6772, 13333, 74284, 133333, 801892, 1333333, 8550364, 13333333, 90286612, 133333333, 945912844, 1333333333, 9846548932, 13333333333, 101952273724, 133333333333, 1050903796852, 1333333333333
Offset: 0

Views

Author

Paul Barry, Jul 30 2004

Keywords

Comments

a(n) = (4/3){1,10,10,100,100,1000...} -9{0,1,0,9,0,81...} -(1/3){1,1,1,1,1,1...} .
a(2n) = A097166(n).
a(2n+1)/4 = A097168(n).

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{1,19,-19,-90,90},{1,4,13,52,133},30] (* Harvey P. Dale, Dec 15 2017 *)

Formula

G.f.: (1+3x-10x^2-18x^3)/((1-x)*(1-9x^2)*(1-10x^2)).
a(n) = 2((1-sqrt(10))(-sqrt(10))^n+(1+sqrt(10))(sqrt(10))^n)/3+3((-3)^n-3^n)/2-1/3.
a(n) = a(n-1) +19a(n-2) -19a(n-3) -90a(n-4) +90a(n-5).

A188215 Starting with an empty list, n is inserted after the a(n)th element such that the binary representations of the list's elements are always sorted lexicographically.

Original entry on oeis.org

0, 1, 2, 3, 3, 4, 6, 7, 4, 5, 7, 8, 11, 12, 14, 15, 5, 6, 8, 9, 12, 13, 15, 16, 20, 21, 23, 24, 27, 28, 30, 31, 6, 7, 9, 10, 13, 14, 16, 17, 21, 22, 24, 25, 28, 29, 31, 32, 37, 38, 40, 41, 44, 45, 47, 48, 52, 53, 55
Offset: 0

Views

Author

Grant Garcia, Mar 24 2011

Keywords

Comments

The last occurrence of any positive n in this sequence is a(2^(n - 1)).
As the list in question expands, its initial terms converge toward A131577.
The last item of the list is always zero or an element of A075427.

Examples

			For example, an a(n) of 3 means that n should be inserted after the 3rd element of the list to keep the elements lexicographically ordered.
[] (Initial empty list)
[0] (Zero inserted at the beginning: a(0) = 0)
[0, 1] (One inserted after element 1: a(1) = 1)
[0, 1, 10] (Two inserted after element 2: a(2) = 2)
[0, 1, 10, 11] (Three inserted after element 3: a(3) = 3)
[0, 1, 10, 100, 11] (Four inserted after element 3: a(4) = 3)
		

Crossrefs

Cf. A264596.

Programs

  • Mathematica
    lst = {}; Table[s = IntegerString[n, 2]; lst = Sort[Append[lst, s]]; Position[lst, s][[1, 1]] - 1, {n, 0, 63}] (* T. D. Noe, Apr 19 2011 *)
  • Python
    l = []
    for i in range(17):
        b = bin(i)[2:]
        l.append(b)
        l.sort()
        print(l.index(b))

Formula

a(2^n + b) = n + b + 1 for b = 0 or 1.
a(2^n - b) = 2^n - b for b = 1 or 2.

Extensions

Program added by Grant Garcia, Mar 30 2011
Edited by Grant Garcia, Apr 13 2011

A362741 Number of parking functions of size n avoiding the pattern 123.

Original entry on oeis.org

1, 1, 3, 11, 48, 232, 1207, 6631, 37998, 225182, 1371560, 8546760, 54294880, 350658336, 2297296991, 15239785151, 102218278626, 692361482818, 4730891905450, 32581995322522, 226000929559056, 1577824515023456, 11080975421752488, 78244477268207656
Offset: 0

Views

Author

Lara Pudwell, May 01 2023

Keywords

Examples

			For n=3 the a(3)=11 parking functions, given in block notation, are {1},{3},{2}; {1,3},{},{2}; {1,3},{2},{}; {2},{1},{3}; {2},{1,3},{}; {2},{3},{1}; {2,3},{},{1}; {2,3},{1},{}; {3},{1},{2}; {3},{1,2},{}; {3},{2},{1}.
		

Crossrefs

Programs

  • Maple
    a:= proc(n) option remember; `if`(n<2, 1, (8*(3*n+4)*(n-1)^2*
          a(n-2)+(21*n^3+25*n^2-2*n-8)*a(n-1))/((3*n+1)*(n+2)^2))
        end:
    seq(a(n), n=0..24);  # Alois P. Heinz, May 01 2023

Formula

a(n) = Sum_{k=ceiling(n/2)..n} A000108(k)*binomial(n,k)*binomial(k,n-k)/(n-k+1).
a(n) mod 2 = 1 <=> n in { A075427 } U {0}. - Alois P. Heinz, May 01 2023
D-finite with recurrence (n+2)^2*a(n) -n*(3*n+2)*a(n-1) +4*(-9*n^2+17*n-6)*a(n-2) -32*(n-2)^2*a(n-3)=0. - R. J. Mathar, Jan 11 2024

A363710 a(n) is the number of pairs of nonnegative integers (x, y) such that x + y = n and A003188(x) AND A003188(y) = 0 (where AND denotes the bitwise AND operator).

Original entry on oeis.org

1, 2, 2, 2, 4, 4, 2, 2, 4, 8, 6, 4, 6, 4, 2, 2, 4, 8, 10, 8, 12, 12, 6, 4, 6, 12, 8, 4, 6, 4, 2, 2, 4, 8, 10, 8, 16, 20, 10, 8, 12, 24, 20, 12, 16, 12, 6, 4, 6, 12, 16, 12, 16, 16, 8, 4, 6, 12, 8, 4, 6, 4, 2, 2, 4, 8, 10, 8, 16, 20, 10, 8, 16, 32, 28, 20, 28
Offset: 0

Views

Author

Rémy Sigrist, Jun 17 2023

Keywords

Comments

Equivalently, a(n) is the number of k >= 0 such that A332497(k) + A332498(k) = n.
The set of pairs of nonnegative integers (x, y) such that A003188(x) AND A003188(y) = 0 is related to the T-square fractal (see illustration in Links section).

Examples

			For n = 8:
- we have:
  k  A332497(8-k)  A332497(k)  A332497(8-k) AND A332497(k)
  -  ------------  ----------  ---------------------------
  0            12           0                            0
  1             4           1                            0
  2             5           3                            1
  3             7           2                            2
  4             6           6                            6
  5             2           7                            2
  6             3           5                            1
  7             1           4                            0
  8             0          12                            0
- so a(8) = 4.
		

Crossrefs

Programs

  • PARI
    a(n) = 2*sum(k=0, n\2, bitand(bitxor(n-k, (n-k)\2), bitxor(k, k\2))==0) - (n==0)
    
  • Python
    A363710=lambda n: sum(map(lambda k: not (k^k>>1)&(n-k^n-k>>1),range(n+1>>1)))<<1 if n else 1 # Natalia L. Skirrow, Jun 22 2023

Formula

a(n) = 2 iff n belongs to A075427.

A381852 In the binary expansion of n (without leading zeros): complement the bits strictly to the right of the leftmost zero digit, if any.

Original entry on oeis.org

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

Views

Author

Rémy Sigrist, Mar 08 2025

Keywords

Comments

This sequence is a self-inverse permutation of the nonnegative integers.
This sequence has similarities with A054429 (where we complement the bits to the right of the leftmost one digit).

Examples

			The first terms, in decimal and in binary, are:
  n   a(n)  bin(n)  bin(a(n))
  --  ----  ------  ---------
   0     0       0          0
   1     1       1          1
   2     2      10         10
   3     3      11         11
   4     5     100        101
   5     4     101        100
   6     6     110        110
   7     7     111        111
   8    11    1000       1011
   9    10    1001       1010
  10     9    1010       1001
  11     8    1011       1000
  12    13    1100       1101
  13    12    1101       1100
  14    14    1110       1110
  15    15    1111       1111
  16    23   10000      10111
		

Crossrefs

Programs

  • PARI
    a(n) = { my (b = binary(n)); for (i = 1, #b, if (b[i]==0, for (j = i+1, #b, b[j] = 1-b[j];); return (fromdigits(b, 2)););); return (n); }
    
  • Python
    def a(n):
        b = bin(n)[2:]
        zi = b.find('0')
        return n if zi == -1 else int(b[:zi+1]+"".join('0' if bi == '1' else '1' for bi in b[zi+1:]), 2)
    print([a(n) for n in range(70)]) # Michael S. Branicky, Mar 09 2025
    
  • Python
    def A381852(n): return n^((1<Chai Wah Wu, Mar 09 2025

Formula

a(n) = n iff n = 0 or n belongs to A075427.
a(n) = XOR(n,2^(A063250(n)-1)-1) if n>0 and A063250(n)>0. Otherwise a(n) = n. - Chai Wah Wu, Mar 09 2025

A066880 Biased numbers: n such that all terms of the sequence f(n), f(f(n)), f(f(f(n))), ..., 1, where f(k) = floor(k/2), are odd.

Original entry on oeis.org

2, 3, 6, 7, 14, 15, 30, 31, 62, 63, 126, 127, 254, 255, 510, 511, 1022, 1023, 2046, 2047, 4094, 4095, 8190, 8191, 16382, 16383, 32766, 32767, 65534, 65535, 131070, 131071, 262142, 262143, 524286, 524287, 1048574, 1048575, 2097150, 2097151, 4194302, 4194303
Offset: 1

Views

Author

Joseph L. Pe, Jan 21 2002

Keywords

Comments

This sequence consists of all numbers of the form 2^k - 2, 2^k - 1, where k >= 2.

Examples

			The sequence corresponding to 14 is 7, 3, 1, all of whose terms are odd. So 14 is a term of the sequence.
		

Crossrefs

Cf. A075427.

Programs

  • Mathematica
    atsoQ[n_]:=AllTrue[Rest[NestWhileList[Floor[#/2]&,n,#>1&]],OddQ]; Select[Range[2,42*10^5],atsoQ] (* Harvey P. Dale, Dec 27 2023 *)

Formula

From Alois P. Heinz, Dec 27 2023: (Start)
G.f.: -x*(2*x^3-3*x-2)/((x-1)*(x+1)*(2*x^2-1)).
a(n) = 2^floor((n+3)/2)-1-(n mod 2). (End)

Extensions

More terms from Larry Reeves (larryr(AT)acm.org), Jun 11 2002

A094027 Expansion of x(1+100x)/((1-x^2)(1-100x^2)).

Original entry on oeis.org

0, 1, 100, 101, 10100, 10101, 1010100, 1010101, 101010100, 101010101, 10101010100, 10101010101, 1010101010100, 1010101010101, 101010101010100, 101010101010101, 10101010101010100, 10101010101010101
Offset: 0

Views

Author

Paul Barry, Apr 22 2004

Keywords

Comments

The expansion of x(1+kx)/((1-x^2)(1-kx^2)) has a(n)=k^((n+1)/2)/(2(sqrt(k)-1))-(-sqrt(k))^(n+1)/(2(sqrt(k)+1))-(-1)^n/2-(k+1)/(2(k-1))

Crossrefs

Cf. A075427, A094025, A080610 (interpreted as binary), A094026.

Formula

a(n)=2^n*5^(n+1)((-1)^n/11+1/9)-(-1)^n/2-101/198
Previous Showing 11-20 of 22 results. Next