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

A065916 Denominator of sigma(8*n^2)/sigma(4*n^2).

Original entry on oeis.org

7, 31, 7, 127, 7, 31, 7, 511, 7, 31, 7, 127, 7, 31, 7, 2047, 7, 31, 7, 127, 7, 31, 7, 511, 7, 31, 7, 127, 7, 31, 7, 8191, 7, 31, 7, 127, 7, 31, 7, 511, 7, 31, 7, 127, 7, 31, 7, 2047, 7, 31, 7, 127, 7, 31, 7, 511, 7, 31, 7, 127, 7, 31, 7, 32767, 7, 31, 7, 127, 7, 31, 7, 511, 7
Offset: 1

Views

Author

Labos Elemer, Nov 28 2001

Keywords

Comments

The sequence is not periodic. The denominators are always of the form -1+2^s.

Examples

			sigma(72)/sigma(36) = 15/7, so a(3) = 7.
		

Crossrefs

Cf. A000203, A007814, A028982, A065915 (numerators), A083420, A220466.

Programs

  • Maple
    nmax:=73: for p from 0 to ceil(simplify(log[2](nmax))) do for n from 1 to ceil(nmax/(p+2)) do a((2*n-1)*2^p) := 2*4^(p+1) - 1 od: od: seq(a(n), n=1..nmax); # Johannes W. Meijer, Feb 12 2013
  • Mathematica
    a[n_] := 2^(2*IntegerExponent[n, 2] + 3) - 1; Array[a, 100] (* Amiram Eldar, Jun 21 2024 *)
  • PARI
    a(n) = denominator(sigma(8*n^2)/sigma(4*n^2)) \\ Harry J. Smith, Nov 04 2009
    
  • PARI
    a(n)=2^(2*valuation(n,2)+3)-1 \\ Charles R Greathouse IV, Nov 18 2015

Formula

From Johannes W. Meijer, Feb 12 2013: (Start)
a((2*n-1)*2^p) = 2*4^(p+1) - 1 for p >= 0 and n >= 1. Observe that a(2^p) = A083420(p+1).
a(2^(p+3)*n + 2^(p+2) - 1) = a(2^(p+2)*n + 2^(p+1) - 1) for p >= 0. (End)
a(n) = 2^s-1, with s = 2*A007814(n) + 3. Recurrence: a(2n) = 4a(n)+3, a(2n+1) = 7. - Ralf Stephan, Aug 22 2013

A085903 Expansion of (1 + 2*x^2)/((1 + x)*(1 - 2*x)*(1 - 2*x^2)).

Original entry on oeis.org

1, 1, 7, 9, 31, 49, 127, 225, 511, 961, 2047, 3969, 8191, 16129, 32767, 65025, 131071, 261121, 524287, 1046529, 2097151, 4190209, 8388607, 16769025, 33554431, 67092481, 134217727, 268402689, 536870911, 1073676289, 2147483647
Offset: 1

Views

Author

Yuval Dekel (dekelyuval(AT)hotmail.com), Aug 16 2003

Keywords

Comments

Resultant of the polynomial x^n - 1 and the Chebyshev polynomial of the first kind T_2(x).
This sequence is the case P1 = 1, P2 = 0, Q = -2 of the 3 parameter family of 4th-order linear divisibility sequences found by Williams and Guy. - Peter Bala, Apr 27 2014

Crossrefs

Programs

  • Magma
    [Round((Sqrt(2)^n - 1)*(Sqrt(2)^n - (-1)^n)): n in [1..40]]; // Vincenzo Librandi, Apr 28 2014
    
  • Maple
    seq(simplify((sqrt(2)^n - 1)*(sqrt(2)^n - (-1)^n)), n = 1..30); # Peter Bala, Apr 27 2014
  • Mathematica
    CoefficientList[ Series[(1 + 2x^2)/(1 - x - 4x^2 + 2x^3 + 4x^4), {x, 0, 30}], x] (* Robert G. Wilson v, May 04 2013 *)
    LinearRecurrence[{1,4,-2,-4},{1,1,7,9},40] (* Harvey P. Dale, Jul 25 2016 *)
  • PARI
    a(n) = polresultant(x^n - 1, 2*x^2 - 1) \\ David Wasserman, Feb 10 2005
    
  • Python
    def A085903(n): return (1<>1))-1)**2 # Chai Wah Wu, Jun 19 2024

Formula

a(2*n) = 2*4^n - 1, a(2*n + 1) = (2^n - 1)^2; interlaces A083420 with A060867 (squares of Mersenne numbers A000225). - Creighton Dement, May 19 2005
A107663(2*n) = a(2*n) = A083420(n). - Creighton Dement, May 19 2005
From Peter Bala, Apr 27 2014: (Start)
a(n) = (sqrt(2)^n - 1)*(sqrt(2)^n - (-1)^n).
a(n) = Product_{k = 1..n} ( 2 - exp(4*k*Pi*i/n) ). (End)
E.g.f.: exp(-x) + exp(2*x) - 2*cosh(sqrt(2)*x). - Ilya Gutkovskiy, Jun 16 2016

Extensions

More terms from David Wasserman, Feb 10 2005
Edited by N. J. A. Sloane at the suggestion of Andrew S. Plewe, Jun 15 2007

A096054 a(n) = (36^n/6)*B(2n,1/6)/B(2n) where B(n,x) is the n-th Bernoulli polynomial and B(k) = B(k,0) is the k-th Bernoulli number.

Original entry on oeis.org

1, 91, 3751, 138811, 5028751, 181308931, 6529545751, 235085301451, 8463265086751, 304679288612371, 10968470088963751, 394865064451017691, 14215143591303768751, 511745180725868773411, 18422826609078989373751, 663221758853362301815531, 23875983327059668074930751
Offset: 1

Views

Author

Benoit Cloitre, Jun 18 2004

Keywords

Crossrefs

Programs

  • Mathematica
    a[n_] := 6^(2*n-1) * BernoulliB[2*n, 1/6] / BernoulliB[2*n]; Array[a, 15] (* Amiram Eldar, May 07 2025 *)
  • PARI
    a(n)=(1/12)*36^n-(1/6)*9^n-(1/4)*4^n+1/2;

Formula

a(n) = (1/12)*(36^n - 2*9^n - 3*4^n+6).
From Colin Barker, May 30 2020: (Start)
G.f.: x*(1 - 6*x)*(1 + 47*x + 36*x^2) / ((1 - x)*(1 - 4*x)*(1 - 9*x)*(1 - 36*x)).
a(n) = 50*a(n-1) - 553*a(n-2) + 1800*a(n-3) - 1296*a(n-4) for n>4. (End)

A137410 a(n) = (5^n - 3)/2.

Original entry on oeis.org

-1, 1, 11, 61, 311, 1561, 7811, 39061, 195311, 976561, 4882811, 24414061, 122070311, 610351561, 3051757811, 15258789061, 76293945311, 381469726561, 1907348632811, 9536743164061, 47683715820311, 238418579101561, 1192092895507811, 5960464477539061, 29802322387695311, 149011611938476561
Offset: 0

Views

Author

Ctibor O. Zizka, Apr 15 2008

Keywords

Comments

Sequence is a(n) = a(n;5,3,1) where a(n;A,B,r) = (A^n - B^r)/(A - B) for arbitrary integers A, B, r with A != B.
Primes of this form are sometimes of interest, examples:
A=2, B=1, r=1 gives A000225 and subsequence of primes: A001348,
A=3, B=1, r=1 gives A003462 and subsequence of primes: A028491,
A=3, B=2, r=1 gives A058481 and subsequence of primes: A014224,
A=4, B=1, r=1 gives A002450,
A=4, B=2, r=1 gives A083420,
A=4, B=2, r=2 gives A002446,
A=5, B=1, r=1 gives A003463 and subsequence of primes: A004061,
A=5, B=2, r=1 gives A037577.
Sum of n-th row of triangle of powers of 5: 1; 5 1 5; 25 5 1 5 25; 125 25 5 1 5 25 125; ... (cf. Examples). - Philippe Deléham, Feb 24 2014
Integer solutions to x^5 - (x+1)^5 -(x+2)^5 +(x+3)^5 = 5^m + 5^n (see Campbell and Zujev). - Michel Marcus, Mar 02 2016

Examples

			From _Philippe Deléham_, Feb 24 2014: (Start)
a(1) = 1;
a(2) = 5 + 1 + 5 = 11;
a(3) = 25 + 5 + 1 + 5 + 25 = 61;
a(4) = 125 + 25 + 5 + 1 + 5 + 25 + 125 = 311;
etc. (End)
		

Crossrefs

Programs

Formula

a(n) = (5^n - 3)/2.
From Colin Barker, May 01 2012: (Start)
a(n) = 6*a(n-1) - 5*a(n-2).
G.f.: (-1+7*x)/((1-x)*(1-5*x)). (End)
a(n) = 5*a(n-1) + 6, a(1) = 1. - Philippe Deléham, Feb 24 2014
From Elmo R. Oliveira, Dec 11 2023: (Start)
a(n) = A024049(n)/2 - 1 = A125831(n) - 1.
E.g.f.: (1/2)*(exp(5*x) - 3*exp(x)). (End)

Extensions

More terms from Michel Marcus, Mar 02 2016
Edited and missing term a(0) inserted by M. F. Hasler, Jul 10 2018

A180938 Smallest k such that k*n has an even number of 1's in its base-2 expansion.

Original entry on oeis.org

3, 3, 1, 3, 1, 1, 9, 3, 1, 1, 3, 1, 3, 9, 1, 3, 1, 1, 3, 1, 3, 3, 1, 1, 3, 3, 1, 9, 1, 1, 33, 3, 1, 1, 3, 1, 3, 3, 1, 1, 3, 3, 1, 3, 1, 1, 3, 1, 3, 3, 1, 3, 1, 1, 3, 9, 1, 1, 3, 1, 3, 33, 1, 3, 1, 1, 3, 1, 3, 3, 1, 1, 3, 3, 1, 3, 1, 1, 3, 1, 3, 3, 1, 3, 1, 1, 5, 3, 1, 1, 5, 1, 11, 3, 1, 1, 3, 3, 1, 3, 1, 1, 9, 3, 1
Offset: 1

Views

Author

Jeffrey Shallit, Sep 26 2010

Keywords

Comments

From Robert G. Wilson v, Sep 29 2010: (Start)
k must always be odd.
First occurrence of odd k: 3, 1, 87, 109, 7, 93, 457, 1143, 5501, 7921, 889, 12775, 11753, 635, 111209, 6093, 31, 33823, 7665, ..., .
(End)

Examples

			For n = 7, a(n) = 9, since the smallest multiple of 7 with an even number of 1's in its base-2 expansion is 9*7 = 63.
		

Crossrefs

Cf. A083420 (where records occur). - Alois P. Heinz, Oct 16 2011

Programs

  • Mathematica
    a[n_] := Block[{k = 1}, While[OddQ@ DigitCount[k*n, 2, 1], k++ ]; k]; Array[a, 100] (* Robert G. Wilson v, Sep 29 2010 *)
  • PARI
    A180938(n) = my(k=1); while(hammingweight(k*n)%2, k += 2); k; \\ Antti Karttunen, Jul 09 2017
    
  • Python
    def a(n):
        k=1
        while True:
            if not bin(k*n)[2:].count('1')%2: return k
            k+=1
    print([a(n) for n in range(1, 61)]) # Indranil Ghosh, Jul 11 2017

Extensions

More terms from Robert G. Wilson v, Sep 29 2010

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

Original entry on oeis.org

1, 6, 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 21 2016

Keywords

Comments

Seems to differ from A267888 and A083420 only at a(1). - R. J. Mathar, Jun 24 2025

References

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

Crossrefs

Cf. A267871.

Programs

  • Mathematica
    rule=239; 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 22 2016 and Apr 17 2019: (Start)
a(n) = 5*a(n-1)-4*a(n-2) for n>3.
G.f.: (1+x+5*x^2-4*x^3) / ((1-x)*(1-4*x)).
(End)
Empirical a(n) = 2^(2*n+1) - 1 for n>1. - Colin Barker, Nov 25 2016

A285475 Decimal representation of the diagonal from the origin to the corner of the n-th stage of growth of the two-dimensional cellular automaton defined by "Rule 3", based on the 5-celled von Neumann neighborhood.

Original entry on oeis.org

1, 3, 4, 15, 16, 63, 64, 255, 256, 1023, 1024, 4095, 4096, 16383, 16384, 65535, 65536, 262143, 262144, 1048575, 1048576, 4194303, 4194304, 16777215, 16777216, 67108863, 67108864, 268435455, 268435456, 1073741823, 1073741824, 4294967295, 4294967296
Offset: 0

Views

Author

Robert Price, Apr 19 2017

Keywords

Comments

Initialized with a single black (ON) cell at stage zero.

References

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

Crossrefs

Cf. A083420.
Cf. A000302 (even bisection), A024036 (odd bisection).

Programs

  • Mathematica
    CAStep[rule_, a_] := Map[rule[[10 - #]] &, ListConvolve[{{0, 2, 0},{2, 1, 2}, {0, 2, 0}}, a, 2],{2}];
    code = 3; stages = 128;
    rule = IntegerDigits[code, 2, 10];
    g = 2 * stages + 1; (* Maximum size of grid *)
    a = PadLeft[{{1}}, {g, g}, 0,Floor[{g, g}/2]]; (* Initial ON cell on grid *)
    ca = a;
    ca = Table[ca = CAStep[rule, ca], {n, 1, stages + 1}];
    PrependTo[ca, a];
    (* Trim full grid to reflect growth by one cell at each stage *)
    k = (Length[ca[[1]]] + 1)/2;
    ca = Table[Table[Part[ca[[n]] [[j]],Range[k + 1 - n, k - 1 + n]], {j, k + 1 - n, k - 1 + n}], {n, 1, k}];
    Table[FromDigits[Part[ca[[i]] [[i]], Range[i, 2 * i - 1]], 10], {i, 1, stages - 1}]

Formula

From Colin Barker, Apr 19 2017: (Start)
G.f.: (1 + 3*x - x^2) / ((1 - x)*(1 + x)*(1 - 2*x)*(1 + 2*x)).
a(n) = (-1 - (-2)^n + (-1)^n + 3*2^n)/2.
a(n) = 5*a(n-2) - 4*a(n-4) for n>3. (End)
a(2*n-1) + a(2*n) = A083420(n). - Paul Curtz, Dec 16 2024

A331892 Positive numbers k such that the negabinary expansion (A039724) of -k is palindromic.

Original entry on oeis.org

1, 5, 7, 17, 21, 31, 35, 57, 65, 85, 93, 119, 127, 147, 155, 201, 217, 257, 273, 325, 341, 381, 397, 455, 471, 511, 527, 579, 595, 635, 651, 745, 777, 857, 889, 993, 1025, 1105, 1137, 1253, 1285, 1365, 1397, 1501, 1533, 1613, 1645, 1767, 1799, 1879, 1911, 2015
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 is 1111 which is palindromic.
		

Crossrefs

Programs

  • Mathematica
    negabin[n_] := negabin[n] = If[n==0, 0, negabin[Quotient[n-1, -2]]*10 + Mod[n, 2]]; Select[Range[2000], PalindromeQ @ negabin[-#] &]

A132207 Triangle read by rows: row n lists first 2*4^n terms of an array read by rows, in which row k gives 2*4^n + 3*k - 1; 5*4^n + 3*k - 1, with k>=0 in each array.

Original entry on oeis.org

1, 4, 7, 19, 10, 22, 13, 25, 16, 28, 31, 79, 34, 82, 37, 85, 40, 88, 43, 91, 46, 94, 49, 97, 52, 100, 55, 103, 58, 106, 61, 109, 64, 112, 67, 115, 70, 118, 73, 121, 76, 124, 127, 319, 130, 322, 133, 325, 136, 328, 139, 331, 142, 334, 145, 337, 148, 340, 151, 343, 154
Offset: 0

Views

Author

Paul Curtz, Nov 06 2007

Keywords

Examples

			Contribution from _Omar E. Pol_, Jan 06 2009: (Start)
Triangle begins:
1,4;
7,19,10,22,13,25,16,28;
31,79,34,82,37,85,40,88,43,91,......,76,124;
127,319,130,322,133,325,136,328,139,331,142,334,145,337,......,316,508;
...
Array, in row 0, is
1, 4
...
Array, in row 1, is
7, 19
10, 22
13, 25
16, 28
...
Array, in row 2, begins:
31, 79
34, 82
37, 85
40, 88
And so on.
(End)
		

Crossrefs

Cf. A000302, A016777, A083420. [From Omar E. Pol, Jan 06 2009]

Extensions

Edited with better definition by Omar E. Pol, Jan 04 2009

A140252 Inverse binomial transform of A140420.

Original entry on oeis.org

0, 1, 1, 7, 7, 31, 31, 127, 127, 511, 511, 2047, 2047, 8191, 8191, 32767, 32767, 131071, 131071, 524287, 524287, 2097151, 2097151, 8388607, 8388607, 33554431, 33554431, 134217727, 134217727, 536870911, 536870911
Offset: 0

Views

Author

Paul Curtz, Jun 23 2008

Keywords

Comments

Also, the decimal representation of the diagonal from the origin to the corner of the n-th stage of growth of the two-dimensional cellular automaton defined by "Rule 673", based on the 5-celled von Neumann neighborhood, initialized with a single black (ON) cell at stage zero. - Robert Price, Jul 23 2017

References

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

Programs

  • Mathematica
    Join[{0},LinearRecurrence[{1,4,-4},{1,1,7},30]] (* Harvey P. Dale, May 28 2012 *)

Formula

a(2n+1) = a(2n+2)= A083420(n).
a(n+1)-2a(n) = (-1)^n*A014551(n), n>0.
a(n+1)-2a(n)-1 = 2*(-1)^n*A131577(n).
O.g.f.: x(1+2x^2)/((2x-1)(1+2x)(x-1)). - R. J. Mathar, Aug 02 2008
a(n) = a(n-1)+4*a(n-2)-4*a(n-3), a(0)=0, a(1)=1, a(2)=1, a(3)=7. - Harvey P. Dale, May 28 2012

Extensions

Edited and extended by R. J. Mathar, Aug 02 2008
Previous Showing 31-40 of 58 results. Next