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

A375776 Bitwise conflict-free sequence: Each number n is placed into the first set k that contains no element x where n AND x > 0: a(n) = k.

Original entry on oeis.org

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

Views

Author

Matt Donahoe, Aug 27 2024

Keywords

Examples

			For n = 1, a(1) = 1 because 1 gets put into the first set.
For n = 2, a(2) = 1 because 2 AND 1 == 0, so 2 can also be put into the first set.
For n = 3, a(3) = 2 because 3 AND 1 == 1, so 3 must be put into a new set.
		

Crossrefs

Programs

  • Maple
    s:= proc() {} end:
    a:= proc(n) option remember; local k; for k
          while ormap(x-> Bits[And](x, n)>0, s(k)) do od;
          s(k):= {s(k)[], n}; k
        end:
    seq(a(n), n=1..75);  # Alois P. Heinz, Aug 27 2024
  • PARI
    seq(n)={my(a=vector(n), L=vector(n)); for(n=1, n, for(j=1, oo, if(!bitand(n,L[j]), L[j]=bitor(L[j],n); a[n]=j; break))); a} \\ Andrew Howroyd, Aug 27 2024
  • Python
    def seq(n):
        L = [0] + [0] * n
        for i in range(1, n + 1):
            k = next((k for k in range(1, len(L)) if i & L[k] == 0), None)
            L[k] |= i
            yield k
    

Formula

a(n) = 1 <=> n in { A000079 }. - Andrew Howroyd, Aug 27 2024
a(n) = 2 <=> n in { A164346 }. - Alois P. Heinz, Aug 27 2024
a(n) = A279125(n) + 1. - Rémy Sigrist, Aug 30 2024

A166976 Array of A002450 in the top row and higher-order differences in subsequent rows, read by antidiagonals.

Original entry on oeis.org

0, 1, 1, 3, 4, 5, 9, 12, 16, 21, 27, 36, 48, 64, 85, 81, 108, 144, 192, 256, 341, 243, 324, 432, 576, 768, 1024, 1365, 729, 972, 1296, 1728, 2304, 3072, 4096, 5461, 2187, 2916, 3888, 5184, 6912, 9216, 12288, 16384, 21845, 6561
Offset: 0

Views

Author

Paul Curtz, Oct 26 2009

Keywords

Examples

			The array starts:
0,   1,   5,  21,  85, 341,1365,5461,21845,87381,349525,    A002450
1,   4,  16,  64, 256,1024,4096,16384,65536,262144,1048576, A000302
3,  12,  48, 192, 768,3072,12288,49152,196608,786432,       A002001, A164346, A110594
9,  36, 144, 576,2304,9216,36864,147456                     A002063, A055841
		

Programs

  • Maple
    A002450 := proc(n) (4^n-1)/3 ; end proc:
    A166976 := proc(n,k) option remember; if n = 0 then A002450(k) else procname(n-1,k+1)-procname(n-1,k) ; end if; end proc: # R. J. Mathar, Jul 02 2011

Formula

T(0,k) = A002450(k). T(n,k) = T(n-1,k+1) - T(n-1,k), n > 0.

A174971 Periodic sequence: Repeat 3, -3.

Original entry on oeis.org

3, -3, 3, -3, 3, -3, 3, -3, 3, -3, 3, -3, 3, -3, 3, -3, 3, -3, 3, -3, 3, -3, 3, -3, 3, -3, 3, -3, 3, -3, 3, -3, 3, -3, 3, -3, 3, -3, 3, -3, 3, -3, 3, -3, 3, -3, 3, -3, 3, -3, 3, -3, 3, -3, 3, -3, 3, -3, 3, -3, 3, -3, 3, -3, 3, -3, 3, -3, 3, -3, 3, -3, 3, -3, 3, -3, 3, -3, 3, -3, 3, -3, 3, -3
Offset: 0

Views

Author

Klaus Brockhaus, Apr 04 2010

Keywords

Comments

Interleaving of A010701 and -A010701; signed version of A010701.
Essentially first differences of A010674.
Inverse binomial transform of 3 followed by A000004.
Second inverse binomial transform of A010701.
Third inverse binomial transform of A007283.
Fourth inverse binomial transform of A000244 without initial term 1.
Fifth inverse binomial transform of A164346.
Sixth inverse binomial transform of A005053 without initial term 1.
Seventh inverse binomial transform of A169604.
Eighth inverse binomial transform of A169634.
Ninth inverse binomial transform of A103333 without initial term 1.
Tenth inverse binomial transform of A013708.
Eleventh inverse binomial transform of A093138 without initial term 1.

Crossrefs

Cf. A010701 (all 3's sequence), A000004 (all zeros sequence), A007283 (3*2^n), A000244 (powers of 3), A164346 (3*4^n), A005053 (expand (1-2x)/(1-5x)), A169604 (3*6^n), A169634 (3*7^n), A103333 (expand (1-5x)/(1-8x)), A013708 (3^(2n+1)), A093138 (expand (1-7x)/(1-10x)).

Programs

  • Magma
    &cat[ [3, -3]: n in [0..41] ];
    [ 3*(-1)^n: n in [0..83] ];
    
  • Mathematica
    PadRight[{},120,{3,-3}] (* or *) NestList[-1#&,3,120] (* Harvey P. Dale, Dec 30 2023 *)
  • PARI
    a(n)=3*(-1)^n \\ Charles R Greathouse IV, Jun 13 2013

Formula

a(n) = 3*(-1)^n.
a(n) = -a(n-1) for n > 0; a(0) = 3.
a(n) = a(n-2) for n > 1; a(0) = 3, a(1) = -3.
G.f.: 3/(1+x).
Previous Showing 11-13 of 13 results.