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

A145563 a(0)=0 and a(n+1) = 3*a(n) + 2^(n+2).

Original entry on oeis.org

0, 4, 20, 76, 260, 844, 2660, 8236, 25220, 76684, 232100, 700396, 2109380, 6344524, 19066340, 57264556, 171924740, 516036364, 1548633380, 4646948716, 13942943300, 41833024204, 125507461220, 376539160876, 1129651037060, 3389020220044, 10167194877860
Offset: 0

Views

Author

N. J. A. Sloane, Mar 18 2009

Keywords

Comments

Suggested by a discussion on the Sequence Fans Mailing List; the formula is due to Andrew V. Sutherland.
First differences of A255459. - Klaus Purath, Apr 25 2020

Crossrefs

Programs

  • Magma
    [ 4*(3^n - 2^n): n in [0..50]]; // Vincenzo Librandi, Apr 24 2011
    
  • Mathematica
    CoefficientList[Series[4x/((1-2x)(1-3x)),{x,0,40}],x] (* or *) RecurrenceTable[{a[0]==0, a[n]==(3a[n-1]+2^(n+1))},a,{n,40}] (* Harvey P. Dale, Apr 24 2011 *)
  • PARI
    a(n) = 4*(3^n - 2^n) \\ Felix Fröhlich, Sep 01 2018

Formula

From R. J. Mathar, Mar 18 2009: (Start)
a(n) = 4*(3^n - 2^n) = 4*A001047(n).
G.f.: 4*x/((1-2*x)*(1-3*x)). (End)
a(n) = A056182(n)*2. - Omar E. Pol, Mar 18 2009
a(n) = A217764(n,7). - Ross La Haye, Mar 27 2013
From Klaus Purath, Apr 25 2020: (Start)
a(n) = 5*a(n-1) - 6*a(n-2).
a(n) = 2*A210448(n) - A056182(n).
a(n) = (A056182(n) + A245804(n+1))/2. (End)

A260217 Number of base-3 n-digit pandigital numbers.

Original entry on oeis.org

0, 0, 4, 24, 100, 360, 1204, 3864, 12100, 37320, 114004, 346104, 1046500, 3155880, 9500404, 28566744, 85831300, 257756040, 773792404, 2322425784, 6969374500, 20912317800, 62745342004, 188252803224, 564791964100, 1694443001160, 5083463221204, 15250658099064
Offset: 1

Views

Author

Jon E. Schoenfield, Jul 19 2015

Keywords

Comments

From Manfred Boergens, Aug 02 2023: (Start)
a(n+1) is the number of pairs (A,B) where A and B are nonempty subsets of {1,2,...,n} and one of these subsets is a proper subset of the other.
If "proper" is omitted, see A091344.
If empty subsets are included, see A027649 (all subsets) and A056182 (proper subsets). (End)

Examples

			a(3)=4 because, in base 3, there are four 3-digit pandigital numbers (11=102_3, 15=120_3, 19=201_3, and 21=210_3).
a(4)=24 because, in base 3, there are 24 4-digit pandigital numbers (1002_3, 1012_3, 1020_3, 1021_3, 1022_3, 1102_3, 1120_3, 1200_3, 1201_3, 1202_3, 1210_3, 1220_3, 2001_3, 2010_3, 2011_3, 2012_3, 2021_3, 2100_3, 2101_3, 2102_3, 2110_3, 2120_3, 2201_3, and 2210_3).
		

Crossrefs

Programs

  • Magma
    [2*3^(n-1) - 2^(n+1) + 2: n in [1..30]]; // Vincenzo Librandi, Jul 20 2015
  • Mathematica
    Table[2 3^(n - 1) - 2^(n + 1) + 2, {n, 30}] (* Vincenzo Librandi, Jul 20 2015 *)

Formula

a(n) = 2*A028243(n) = 2*3^(n-1) - 2^(n+1) + 2.
a(n) = 4*A000392(n).
G.f.: 4*x^3/((1-x)*(1-2*x)*(1-3*x)).
E.g.f.: 2/3*((exp(x)-1)^3).

A350771 Triangle read by rows: T(n, k) = (2^(n-k-1) + 2^k - 2)*binomial(n-1, k), 0 <= k <= n-1.

Original entry on oeis.org

0, 1, 1, 3, 4, 3, 7, 12, 12, 7, 15, 32, 36, 32, 15, 31, 80, 100, 100, 80, 31, 63, 192, 270, 280, 270, 192, 63, 127, 448, 714, 770, 770, 714, 448, 127, 255, 1024, 1848, 2128, 2100, 2128, 1848, 1024, 255, 511, 2304, 4680, 5880, 5796, 5796, 5880, 4680, 2304, 511, 1023, 5120, 11610, 16080, 16380, 15624, 16380, 16080, 11610, 5120, 1023
Offset: 1

Views

Author

Keywords

Comments

The elements in T(n,k) result from the product of each element of A350770(n,k) and binomial(n-1,k).

Examples

			Triangle begins:
     0;
     1,    1;
     3,    4,     3;
     7,   12,    12,     7;
    15,   32,    36,    32,    15;
    31,   80,   100,   100,    80,    31;
    63,  192,   270,   280,   270,   192,    63;
   127,  448,   714,   770,   770,   714,   448,   127;
   255, 1024,  1848,  2128,  2100,  2128,  1848,  1024,   255;
   511, 2304,  4680,  5880,  5796,  5796,  5880,  4680,  2304,  511;
  1023, 5120, 11610, 16080, 16380, 15624, 16380, 16080, 11610, 5120, 1023;
...
		

Crossrefs

Column k=0 gives A000225(n-1).
Row sums give A056182(n-1) = 2*A001047(n-1).

Programs

  • Maple
    T := n -> local k; seq((2^(n - k - 1) + 2^k - 2)*binomial(n - 1, k), k = 0 .. n - 1);
    seq(T(n), n = 1 .. 11);
  • PARI
    T(n, k) = (2^(n-k-1) + 2^k - 2)*binomial(n-1, k) \\ Andrew Howroyd, Jan 05 2024

Formula

T(n, k) = (2^(n-k-1) + 2^k - 2)*binomial(n-1, k).

A071055 Number of 0's in n-th row of triangle in A071038.

Original entry on oeis.org

0, 0, 2, 0, 2, 2, 6, 0, 2, 2, 6, 2, 6, 6, 14, 0, 2, 2, 6, 2, 6, 6, 14, 2, 6, 6, 14, 6, 14, 14, 30, 0, 2, 2, 6, 2, 6, 6, 14, 2, 6, 6, 14, 6, 14, 14, 30, 2, 6, 6, 14, 6, 14, 14, 30, 6, 14, 14, 30, 14, 30, 30, 62, 0, 2, 2, 6, 2, 6, 6, 14, 2, 6, 6, 14, 6, 14, 14, 30, 2, 6, 6, 14, 6
Offset: 0

Views

Author

Hans Havermann, May 26 2002

Keywords

Comments

a(n) is also the number of pairs of consecutive entries in the n-th row of Pascal's triangle with opposite parity.
All terms appear to be of the form 2^k - 2 (checked for n <= 10000). - Michael De Vlieger, Mar 02 2015
This appears to be equal to the number of previous values k, from 1..n-1, such that k AND n = k, where 'AND' is binary AND, and where the sequence starts at 1. For example, 1 AND 2 = 0, so a(2) = 0, while 1 AND 3 = 1 and 2 AND 3 = 2, so a(3) = 2. It follows from this that if n = 2^m - 1 then a(n) = n - 1 = 2^m - 2, giving the right border values noted below. - Scott R. Shannon, Apr 19 2023

Examples

			From _Omar E. Pol_, Mar 02 2015: (Start)
Also, written as an irregular triangle in which the row lengths are the powers of 2, the sequence begins:
0;
0,2;
0,2,2,6;
0,2,2,6,2,6,6,14;
0,2,2,6,2,6,6,14,2,6,6,14,6,14,14,30;
0,2,2,6,2,6,6,14,2,6,6,14,6,14,14,30,2,6,6,14,6,14,14,30,6,14,14,30,14,30,30,62;
...
It appears that the right border gives the nonnegative terms of A000918.
It appears that the row sums give A056182.
(End)
		

References

  • S. Wolfram, A New Kind of Science, Wolfram Media, 2002; Chapter 3.

Crossrefs

Cf. A071042.

Programs

Formula

a(n)=b(n+1), with b(0)=0, b(2n)=b(n), b(2n+1)=2b(n)+2-2[n==0] (conjectured). - Ralf Stephan, Mar 05 2004
a(n) = pext(n, n + 1) (conjectured) where pext is the "parallel bits extract" instruction of the x86 CPU; pext(x, mask) extracts bits from x at the bit locations specified by mask to contiguous low bits. - Falk Hüffner, Jul 26 2019

A326816 a(0) = 0, a(1) = 1, and for n > 1, a(n) = Sum_{k = 0..n} a((n-k) AND k) (where AND denotes the bitwise AND operator).

Original entry on oeis.org

0, 1, 1, 0, 3, 2, 2, 0, 9, 10, 10, 12, 12, 8, 4, 0, 27, 38, 46, 60, 66, 68, 72, 72, 90, 84, 76, 72, 44, 24, 8, 0, 81, 130, 182, 228, 302, 332, 384, 360, 526, 572, 636, 600, 624, 576, 568, 432, 764, 888, 996, 1008, 972, 936, 888, 864, 712, 560, 408, 320, 144
Offset: 0

Views

Author

Rémy Sigrist, Oct 20 2019

Keywords

Comments

This sequence combines features of A006581 and of A007461.

Examples

			a(2) = a(2 AND 0) + a(1 AND 1) + a(0 AND 2) = a(0) + a(1) + a(0) = 1.
		

Crossrefs

Programs

  • Maple
    a:= proc(n) option remember; `if`(n<2, n,
          add(a(Bits[And](n-k, k)), k=0..n))
        end:
    seq(a(n), n=0..80);  # Alois P. Heinz, Oct 20 2019
  • PARI
    a = vector(61); for (n=0, #a-1, print1 (a[1+n] = if (n==0, 0, n==1, 1, sum (k=0, n, a[1+bitand(n-k,k)])) ", "))

Formula

a(n) is odd iff n is a power of 2.
a(n) = 0 iff n = 2^k with k = 0 or k = 2.
a(2^k) = 3^(k-1) for any k > 0.
a(2^k+1) = A056182(k-1) for any k > 1.
Previous Showing 11-15 of 15 results.