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 41-50 of 58 results. Next

A267938 Decimal representation of the n-th iteration of the "Rule 251" elementary cellular automaton starting with a single ON (black) cell.

Original entry on oeis.org

1, 5, 31, 127, 511, 2047, 8191, 32767, 131071, 524287, 2097151, 8388607, 33554431, 134217727, 536870911, 2147483647, 8589934591, 34359738367, 137438953471, 549755813887, 2199023255551, 8796093022207, 35184372088831, 140737488355327, 562949953421311
Offset: 0

Views

Author

Robert Price, Jan 22 2016

Keywords

Comments

Seems to differ from A267890, A267888 and A083420 only at n=1. - R. J. Mathar, Jun 21 2025

References

  • S. Wolfram, A New Kind of Science, Wolfram Media, 2002; p. 55.

Crossrefs

Cf. A267936.

Programs

  • Mathematica
    rule=251; rows=20; ca=CellularAutomaton[rule,{{1},0},rows-1,{All,All}]; (* Start with single black cell *) catri=Table[Take[ca[[k]],{rows-k+1,rows+k-1}],{k,1,rows}]; (* Truncated list of each row *) Table[FromDigits[catri[[k]],2],{k,1,rows}]   (* Decimal Representation of Rows *)

Formula

Conjectures from Colin Barker, Jan 23 2016 and Apr 16 2019: (Start)
a(n) = 5*a(n-1)-4*a(n-2) for n>3.
G.f.: (1+10*x^2-8*x^3) / ((1-x)*(1-4*x)).
(End)
Empirical a(n) = 2^(2*n+1) - 1 for n>1. - Colin Barker, Nov 25 2016

A331893 Positive numbers k such that both k and -k are a palindromes in negabinary representation.

Original entry on oeis.org

1, 5, 7, 17, 21, 31, 57, 65, 85, 127, 155, 217, 257, 273, 325, 341, 455, 511, 635, 857, 889, 993, 1025, 1105, 1253, 1285, 1365, 1799, 2047, 2159, 2555, 2667, 3417, 3577, 3641, 3937, 4097, 4161, 4369, 4433, 4965, 5125, 5189, 5397, 5461, 6951, 7175, 7967, 8191
Offset: 1

Views

Author

Amiram Eldar, Jan 30 2020

Keywords

Comments

Numbers of the form 2^(2*m-1) - 1 (A083420) and 2^(2*m) + 1 (A052539) are terms.

Examples

			5 is a term since the negabinary representation of 5, 101, and the negabinary representation of -5, 1111, are both palindromic.
		

Crossrefs

Intersection of A331891 and A331892.

Programs

  • Mathematica
    negabin[n_] := negabin[n] = If[n==0, 0, negabin[Quotient[n-1, -2]]*10 + Mod[n, 2]]; nbPalinQ[n_] := And @@ (PalindromeQ @ negabin[#] & /@ {n, -n}); Select[Range[2^13], nbPalinQ]

A084181 2^n+(-2)^n-(-1)^n.

Original entry on oeis.org

1, 1, 7, 1, 31, 1, 127, 1, 511, 1, 2047, 1, 8191, 1, 32767, 1, 131071, 1, 524287, 1, 2097151, 1, 8388607, 1, 33554431, 1, 134217727, 1, 536870911, 1, 2147483647, 1, 8589934591, 1, 34359738367, 1, 137438953471, 1, 549755813887, 1, 2199023255551
Offset: 0

Views

Author

Paul Barry, May 19 2003

Keywords

Comments

Binomial transform is A084182.

Crossrefs

Cf. A083420.

Programs

  • Mathematica
    LinearRecurrence[{-1,4,4},{1,1,7},50] (* or *) Riffle[ LinearRecurrence[ {5,-4},{1,7},30],1] (* Harvey P. Dale, Jan 02 2019 *)

Formula

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

A084184 Partial sums of a Jacobsthal related sequence.

Original entry on oeis.org

0, 1, 2, 7, 10, 31, 42, 127, 170, 511, 682, 2047, 2730, 8191, 10922, 32767, 43690, 131071, 174762, 524287, 699050, 2097151, 2796202, 8388607, 11184810, 33554431, 44739242, 134217727, 178956970, 536870911, 715827882, 2147483647, 2863311530, 8589934591
Offset: 0

Views

Author

Paul Barry, May 19 2003

Keywords

Comments

Partial sums of A084183.

Crossrefs

Programs

  • Maple
    A084184:=n->(5-(-1)^n)*(2^n-1)/6: seq(A084184(n), n=0..50); # Wesley Ivan Hurt, Jan 28 2017
  • Mathematica
    LinearRecurrence[{0,5,0,-4},{0,1,2,7},40] (* Harvey P. Dale, Jan 18 2015 *)
  • PARI
    concat(0, Vec(x*(1+2*x+2*x^2)/((1-x^2)*(1-4*x^2)) + O(x^40))) \\ Colin Barker, Sep 09 2016

Formula

G.f.: x*(1+2*x+2*x^2) / ((1-x^2)*(1-4*x^2)). - typo fixed by Colin Barker, Sep 09 2016
a(2*n+1) = A083420(n). a(2*n) = 2*A002450(n) = 2*A001045(2*n).
From Colin Barker, Sep 09 2016: (Start)
a(n) = (5-(-1)^n)*(2^n-1)/6.
a(n) = 5*a(n-2) - 4*a(n-4) for n>3.
(End)

A137215 a(n) = 3*(10^n) + (n^2 + 1)*(10^n - 1)/9.

Original entry on oeis.org

3, 32, 355, 4110, 48887, 588886, 7111107, 85555550, 1022222215, 12111111102, 142222222211, 1655555555542, 19111111111095, 218888888888870, 2488888888888867, 28111111111111086, 315555555555555527, 3522222222222222190, 39111111111111111075, 432222222222222222182
Offset: 0

Views

Author

Ctibor O. Zizka, Mar 06 2008

Keywords

Comments

Sequence generalized: a(n) = a(0)*(B^n) + F(n)* ((B^n)-1)/(B-1); a(0), B integers, F(n) arithmetic function.
Examples:
a(0) = 1, B = 10, F(n) = 1 gives A002275, F(n) = 2 gives A090843, F(n) = 3 gives A097166, F(n) = 4 gives A099914, F(n) = 5 gives A099915.
a(0) = 1, B = 2, F(n) = 1 gives A000225, F(n) = 2 gives A033484, F(n) = 3 gives A036563, F(n) = 4 gives A048487, F(n) = 5 gives A048488, F(n) = 6 gives A048489.
a(0) = 1, B = 3, F(n) = 1 gives A003462, F(n) = 2 gives A048473, F(n) = 3 gives A134931, F(n) = 4 gives A058481, F(n) = 5 gives A116952.
a(0) = 1, B = 4, F(n) = 1 gives A002450, F(n) = 2 gives A020989, F(n) = 3 gives A083420, F(n) = 4 gives A083597, F(n) = 5 gives A083584.
a(0) = 1, B = 5, F(n) = 1 gives A003463, F(n) = 2 gives A057651, F(n) = 3 gives A117617, F(n) = 4 gives A081655.
a(0) = 2, B = 10, F(n) = 1 gives A037559, F(n) = 2 gives A002276.

Examples

			a(3) = 3*10^3 + (3*3 + 1)*(10^3 - 1)/9 = 4110.
		

Crossrefs

Programs

  • Mathematica
    Table[3*10^n +(n^2 +1)*(10^n -1)/9, {n,0,30}] (* G. C. Greubel, Jan 05 2022 *)
  • PARI
    a(n) = 3*(10^n) + (n*n+1)*((10^n)-1)/9; \\ Jinyuan Wang, Feb 27 2020
    
  • Sage
    [3*10^n +(1+n^2)*(10^n -1)/9 for n in (0..30)] # G. C. Greubel, Jan 05 2022

Formula

a(n) = 3*(10^n) + (n^2 + 1)*(10^n - 1)/9.
O.g.f.: (3 - 67*x + 478*x^2 - 1002*x^3 + 850*x^4 - 100*x^5)/((1-x)^3 * (1-10*x)^3). - R. J. Mathar, Mar 16 2008

Extensions

More terms from R. J. Mathar, Mar 16 2008
More terms from Jinyuan Wang, Feb 27 2020

A173209 Partial sums of A000069.

Original entry on oeis.org

1, 3, 7, 14, 22, 33, 46, 60, 76, 95, 116, 138, 163, 189, 217, 248, 280, 315, 352, 390, 431, 473, 517, 564, 613, 663, 715, 770, 826, 885, 946, 1008, 1072, 1139, 1208, 1278, 1351, 1425, 1501, 1580, 1661, 1743, 1827, 1914, 2002, 2093, 2186, 2280, 2377, 2475, 2575
Offset: 1

Views

Author

Jonathan Vos Post, Feb 12 2010

Keywords

Comments

Partial sums of odious numbers. Second differences give A007413. The subsequence of prime partial sums of odious numbers begins: 3, 7, 163, 431, 613, 2377, 3691, which is a subsequence of A027697. The subsequence of odious partial sums of odious numbers begins: 1, 7, 14, 22, 76, 138, 217, 280, 352, 431, 517, 613, 770, 885.

Examples

			a(65) = 1 + 2 + 4 + 7 + 8 + 11 + 13 + 14 + 16 + 19 + 21 + 22 + 25 + 26 + 28 + 31 + 32 + 35 + 37 + 38 + 41 + 42 + 44 + 47 + 49 + 50 + 52 + 55 + 56 + 59 + 61 + 62 + 64 + 67 + 69 + 70 + 73 + 74 + 76 + 79 + 81 + 82 + 84 + 87 + 88 + 91 + 93 + 94 + 97 + 98 + 100 + 103 + 104 + 107 + 109 + 110 + 112 + 115 + 117 + 118 + 121 + 122 + 124 + 127 + 128.
		

Crossrefs

Programs

Formula

a(n) = SUM[i=1..n] A000069(i) = SUM[i=1..n] {i such that A010060(i)=1}.
a(n) = n^2 - n/2 + O(1). - Charles R Greathouse IV, Mar 22 2013

A261349 T(n,k) is the decimal equivalent of a code for k that maximizes the sum of the Hamming distances between (cyclical) adjacent code words; triangle T(n,k), n>=0, 0<=k<=2^n-1, read by rows.

Original entry on oeis.org

0, 0, 1, 0, 3, 1, 2, 0, 7, 1, 6, 3, 4, 2, 5, 0, 15, 1, 14, 3, 12, 2, 13, 6, 9, 7, 8, 5, 10, 4, 11, 0, 31, 1, 30, 3, 28, 2, 29, 6, 25, 7, 24, 5, 26, 4, 27, 12, 19, 13, 18, 15, 16, 14, 17, 10, 21, 11, 20, 9, 22, 8, 23, 0, 63, 1, 62, 3, 60, 2, 61, 6, 57, 7, 56, 5
Offset: 0

Views

Author

Alois P. Heinz, Nov 18 2015

Keywords

Comments

This code might be called "Anti-Gray code".
The sum of the Hamming distances between (cyclical) adjacent code words of row n gives 0, 2, 6, 20, 56, 144, 352, ... = A014480(n-1) for n>1.

Examples

			Triangle T(n,k) begins:
  0;
  0,  1;
  0,  3, 1,  2;
  0,  7, 1,  6, 3,  4, 2,  5;
  0, 15, 1, 14, 3, 12, 2, 13, 6,  9, 7,  8, 5, 10, 4, 11;
  0, 31, 1, 30, 3, 28, 2, 29, 6, 25, 7, 24, 5, 26, 4, 27, 12, 19, ... ;
  0, 63, 1, 62, 3, 60, 2, 61, 6, 57, 7, 56, 5, 58, 4, 59, 12, 51, ... ;
		

Crossrefs

Columns k=0-3 give: A000004, A000225, A000012 (for n>1), A000918 (for n>1).
Row lengths give A000079.
Row sums give A006516.

Programs

  • Maple
    g:= n-> Bits[Xor](n, iquo(n, 2)):
    T:= (n, k)-> (t-> `if`(m=0, t, 2^n-1-t))(g(iquo(k, 2, 'm'))):
    seq(seq(T(n, k), k=0..2^n-1), n=0..6);

Formula

T(n,k) = A003188(k/2) if k even, T(n,k) = 2^n-1-A003188((k-1)/2) else.
A101080(T(n,2k),T(n,2k+1)) = n, A101080(T(n,2k),T(n,2k-1)) = n-1.
T(n,2^n-1) = A083329(n-1) for n>0.
T(n,2^n-2) = A000079(n-2) for n>1.
T(2n,2n) = A003188(n).
T(2n+1,2n+1) = 2*4^n - 1 - A003188(n) = A083420(n) - A003188(n).

A267941 Decimal representation of the n-th iteration of the "Rule 253" elementary cellular automaton starting with a single ON (black) cell.

Original entry on oeis.org

1, 3, 31, 127, 511, 2047, 8191, 32767, 131071, 524287, 2097151, 8388607, 33554431, 134217727, 536870911, 2147483647, 8589934591, 34359738367, 137438953471, 549755813887, 2199023255551, 8796093022207, 35184372088831, 140737488355327, 562949953421311
Offset: 0

Views

Author

Robert Price, Jan 22 2016

Keywords

Comments

With the exception of a(1) the same as A267938, A267890, A267888 and A083420. - R. J. Mathar, Jan 24 2016

References

  • S. Wolfram, A New Kind of Science, Wolfram Media, 2002; p. 55.

Crossrefs

Cf. A060576.

Programs

  • Mathematica
    rule=253; rows=20; ca=CellularAutomaton[rule,{{1},0},rows-1,{All,All}]; (* Start with single black cell *) catri=Table[Take[ca[[k]],{rows-k+1,rows+k-1}],{k,1,rows}]; (* Truncated list of each row *) Table[FromDigits[catri[[k]],2],{k,1,rows}]   (* Decimal Representation of Rows *)

Formula

Conjectures from Colin Barker, Jan 23 2016 and Apr 16 2019: (Start)
a(n) = 5*a(n-1)-4*a(n-2) for n>3.
G.f.: (1-2*x+20*x^2-16*x^3) / ((1-x)*(1-4*x)).
(End)
Empirical a(n) = 2^(2*n+1) - 1 for n>1. - Colin Barker, Nov 26 2016

A269255 a(n) = (2^(2*n+1) - 1)*(3^(n+1) - 1)/2.

Original entry on oeis.org

1, 28, 403, 5080, 61831, 745108, 8952763, 107475760, 1289869711, 15479049388, 185750955523, 2229020652040, 26748283770391, 320979546636868, 3851755118036683, 46221063628493920, 554652772325571871, 6655833302847731548, 79869999773355124243, 958439997835247481400, 11501279976237683562151
Offset: 0

Views

Author

Ilya Gutkovskiy, Jul 13 2016

Keywords

Comments

The sum of divisors of powers of 12 (A001021).
The sum of divisors of powers of prime p are sigma_1(p^n) = Sum_{m=0}^n p^m = (p^(n+1) - 1)/(p - 1) (see examples in the links section).

Examples

			a(1) = 28, because 12^1 = 12 and 12 has 6 divisors (1, 2, 3, 4, 6, 12) -> 1 + 2 + 3 + 4 + 6 + 12 = 28.
		

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{20, -115, 240, -144}, {1, 28, 403, 5080}, 21]
    Table[(2^(2 n + 1) - 1) ((3^(n + 1) - 1)/2), {n, 0, 20}]
    Table[DivisorSigma[1, 12^n], {n, 0, 20}]
  • PARI
    a(n)=(2^(2*n+1)-1)*(3^(n+1)-1)/2 \\ Charles R Greathouse IV, Jul 26 2016

Formula

O.g.f.: (1 + 8*x - 42*x^2)/((1 - x)*(1 - 3*x)*(1 - 4*x)*(1 - 12*x)).
E.g.f.: (1 - 3*exp(2*x) - 2*exp(3*x) + 6*exp(11*x))*exp(x)/2.
a(n) = 20*a(n-1) - 115*a(n-2) + 240*a(n-3) - 144*a(n-4).
a(n) = A000203(A001021(n)).
a(n) = A000203(A000244(n))*A000203(A000302(n)).
a(n) = A083420(n)*A003462(n+1).
Sum_{n>=0} (-1)^n*a(n)/n! = (6 - 2*exp(8) - 3*exp(9) + exp(11))/(2*exp(12)) = 0.0909619117822510506...
Lim_{n->infinity} a(n)/a(n+1) = 1/12 = A021016.

A280293 a(0) = 3, a(n+1) = 2*a(n) + periodic sequence of length 2: repeat [-5, 4].

Original entry on oeis.org

3, 1, 6, 7, 18, 31, 66, 127, 258, 511, 1026, 2047, 4098, 8191, 16386, 32767, 65538, 131071, 262146, 524287, 1048578, 2097151, 4194306, 8388607, 16777218, 33554431, 67108866, 134217727, 268435458, 536870911, 1073741826, 2147483647, 4294967298, 8589934591
Offset: 0

Views

Author

Paul Curtz, Dec 31 2016

Keywords

Comments

From 1, the last digit is a periodic sequence of length 4:repeat [1, 6, 7, 8].

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{2,1,-2},{3,1,6},50] (* Paolo Xausa, Nov 13 2023 *)
  • PARI
    Vec((3-5*x+x^2) / ((1-x)*(1+x)*(1-2*x)) + O(x^40)) \\ Colin Barker, Dec 31 2016

Formula

a(2n) = 4^n + 2. a(2n+1) = 2*4^n - 1.
a(n) = 2*a(n-1) + a(n-2) - 2*a(n-3), n>2.
a(n) = 2^n + periodic sequence of length 2: repeat [2, -1].
a(n) = 2^(n+2) - A280173(n).
a(n+2) = a(n) + 3*2^n, a(0) = 3, a(1) = 1.
G.f.: (3-5*x+x^2) / ((1-x)*(1+x)*(1-2*x)). - Colin Barker, Dec 31 2016

Extensions

More terms from Colin Barker, Dec 31 2016
Previous Showing 41-50 of 58 results. Next