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.

User: Dean Hickerson

Dean Hickerson's wiki page.

Dean Hickerson has authored 148 sequences. Here are the ten most recent ones:

A126803 Integers that die when submitted to the rules of the Game of Life. Design of the digits is shown below.

Original entry on oeis.org

8, 10, 11, 14, 18, 20, 31, 48, 50, 81, 83, 87, 88, 101, 118, 122, 127, 144, 148, 155, 157, 161, 174, 181, 188, 191, 199, 202, 205, 206, 208, 218, 221, 222, 228, 245, 247, 248, 274, 278, 284, 285, 295, 302, 304, 305, 308, 309, 312, 313, 315, 323, 327, 331, 342
Offset: 1

Author

Eric Angelini and Dean Hickerson, Feb 22 2007

Keywords

Comments

Here's the font that's used; a single empty column is used between adjacent digits. The same digit design was selected 39 years ago by Jonathan Vos Post.
ooo.o.ooo.ooo.o.o.ooo.ooo.ooo.ooo.ooo
o.o.o...o...o.o.o.o...o.....o.o.o.o.o
o.o.o.ooo.ooo.ooo.ooo.ooo...o.ooo.ooo
o.o.o.o.....o...o...o.o.o...o.o.o...o
ooo.o.ooo.ooo...o.ooo.ooo...o.ooo.ooo
The sequence is infinite; e.g., any number whose decimal expansion begins and ends with 14 and contains only the digits 1, 4 and 8 dies in 9 generations. It has density zero, because any number containing the digit string 14405930 emits a lightweight spaceship which can't be stopped by whatever the rest of the number produces.

Extensions

Edited by Dean Hickerson, Mar 02 2007

A126237 Length of row n in table A126014.

Original entry on oeis.org

1, 2, 1, 2, 2, 3, 3, 3, 2, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 3, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6
Offset: 3

Author

Dean Hickerson, Dec 21 2006

Keywords

Comments

a(n) is 1 less than the number of distinct codeword lengths in Huffman encoding of n symbols, where the k-th symbol has frequency k.

Examples

			Row 8 of A126014 is (6,3,2), so a(8)=3.
		

Crossrefs

Cf. A126014. The minimum length of a codeword is in A126235. The maximum length is in A126236.

Formula

I conjecture that there are no gaps in the set of codeword lengths; that is, every integer that's between the minimum and maximum codeword lengths occurs as a codeword length. If so, then a(n) = A126236(n) - A126235(n). If, in addition, the conjectured formulas for the min and max lengths are correct, then a(n) = floor(log_2(n)) unless n has the form 3*2^k-1, in which case a(n) = floor(log_2(n)) - 1. This is true at least for n up to 1000.

A126235 Minimum length of a codeword in Huffman encoding of n symbols, where the k-th symbol has frequency k.

Original entry on oeis.org

1, 1, 1, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6
Offset: 2

Author

Dean Hickerson, Dec 21 2006

Keywords

Examples

			A Huffman code for n=8 is (1->00000, 2->00001, 3->0001, 4->001, 5->010, 6->011, 7->10, 8->11). The shortest codewords have length a(8)=2.
		

Crossrefs

Cf. A099396, A126014 and A126237. The maximum length of a codeword is in A126236.

Formula

Conjecture: a(n) = A099396(n+1) = floor(log_2(2(n+1)/3)). Equivalently, a(n) = a(n-1) + 1 if n has the form 3*2^k-1, a(n) = a(n-1) otherwise. This is true at least for n up to 1000.

A126236 Maximum length of a codeword in Huffman encoding of n symbols, where the k-th symbol has frequency k.

Original entry on oeis.org

1, 2, 3, 3, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11
Offset: 2

Author

Dean Hickerson, Dec 21 2006

Keywords

Examples

			A Huffman code for n=8 is (1->00000, 2->00001, 3->0001, 4->001, 5->010, 6->011, 7->10, 8->11). The longest codewords have length a(8)=5.
		

Crossrefs

Cf. A126014 and A126237. The minimum length of a codeword is in A126235.

Formula

Conjecture: a(n) = floor(log_2(n)) + floor(log_2(2n/3)). Equivalently, a(n) = a(n-1) + 1 if n has the form 2^k or 3*2^k, a(n) = a(n-1) otherwise. This is true at least for n up to 1000.

A112627 Decimal equivalent of number defined by last k bits of the infinite binary string ...0011001100110011 (numbers with leading zeros omitted).

Original entry on oeis.org

1, 3, 19, 51, 307, 819, 4915, 13107, 78643, 209715, 1258291, 3355443, 20132659, 53687091, 322122547, 858993459, 5153960755, 13743895347, 82463372083, 219902325555, 1319413953331, 3518437208883, 21110623253299, 56294995342131, 337769972052787, 900719925474099
Offset: 1

Author

N. J. A. Sloane, based on email from Artur Jasinski, with assistance from Dean Hickerson, Ray Chandler and Robert G. Wilson v, Dec 27 2005

Keywords

Comments

A182512 is a bisection. - Olena Kachko, Dec 16 2023

Examples

			1 = 1
11 = 3
10011 = 19
110011 = 51
100110011 = 307
1100110011 = 819
...
		

Crossrefs

Cf. A182512.

Programs

  • Maple
    seq(4^(n-1) - (4 + (-4)^n)/20, n=1..100); # Robert Israel, Sep 02 2014
  • Mathematica
    t = {}; lst = First@RealDigits[ N[1/5, 100], 2]; Do[ If[ lst[[n]] == 1, AppendTo[t, FromDigits[ Reverse@Take[lst, n], 2]]], {n, 49}]; t
    (* The first line establishes the binary expansion of 1/5 to 100 places (A021913, except for start). The loop extracts the first n terms in this sequence and if it ends in "1", reverses digits and converts to decimal. *)
    Table[FromDigits[PadLeft[{},n,{0,0,1,1}],2],{n,60}]//Union (* Harvey P. Dale, Mar 15 2016 *)
  • PARI
    Vec(x*(1+2*x)/((1-x)*(1-4*x)*(1+4*x)) + O(x^50)) \\ Colin Barker, May 19 2016

Formula

G.f.: x*(1+2*x)/(1-x-16*x^2+16*x^3).
a(n) = 4^(n-1) - (4 + (-4)^n)/20. - Robert Israel, Sep 02 2014
a(n) = a(n-1)+16*a(n-2)-16*a(n-3) for n>3. - Colin Barker, May 19 2016

A113780 Number of solutions to 24*n+1 = x^2+24*y^2, x a positive integer, y an integer.

Original entry on oeis.org

1, 3, 3, 2, 2, 3, 4, 1, 2, 4, 2, 4, 1, 2, 2, 1, 8, 2, 2, 2, 0, 4, 1, 4, 2, 2, 5, 4, 2, 0, 4, 4, 2, 0, 0, 3, 4, 4, 4, 2, 3, 4, 2, 2, 4, 0, 0, 2, 2, 4, 2, 9, 2, 0, 2, 2, 4, 1, 4, 0, 4, 4, 2, 0, 4, 4, 4, 2, 0, 2, 1, 8, 0, 2, 2, 2, 6, 1, 2, 4, 0, 4, 4, 2, 2, 0, 8, 2, 2, 2, 2, 0, 1, 8, 0, 2, 4, 0, 0, 2, 5, 6, 4, 2, 4
Offset: 0

Author

Christian G. Bower, Jan 20 2006, based on a message from Dean Hickerson

Keywords

Comments

If 24*n+1 is not a square or if sqrt(24*n+1) == 1 or 11 (mod 12), then A000009(n) == a(n) (mod 4), otherwise A000009(n) == a(n) + 2 (mod 4).
Implied by the arithmetic of Q[sqrt(-6)]: Let 24*n+1 = p_1^e_1 * ... * p_r^e_r * q_1^f_1 * ... * q_s^f_s, where the p_i's are distinct primes == 1, 5, 7, or 11 (mod 24) and the q_i's are distinct primes == 13, 17, 19, or 23 (mod 24). If some f_i is odd, then a(n) = 0. Otherwise, a(n) = (e_1 + 1) * ... * (e_r + 1). a(n) == 2 (mod 4) iff all of the f_i's are even and all but one of the e_i's are even and the one e_i which is odd is == 1 (mod 4). Since A000009(n) and a(n) are both odd if 24*n+1 is a square, we can replace a by A000009 in this.
Ramanujan theta functions: f(q) (see A121373), phi(q) (A000122), psi(q) (A010054), chi(q) (A000700).

Examples

			If n=51, the solutions (x,y) are: (7,+-7), (19,+-6), (25,+-5), (29,+-4), (35,0) so a(51)=9.
G.f. = 1 + 3*x + 3*x^2 + 2*x^3 + 2*x^4 + 3*x^5 + 4*x^6 + x^7 + 2*x^8 + 4*x^9 + ...
G.f. = q + 3*q^25 + 3*q^49 + 2*q^73 + 2*q^97 + 3*q^121 + 4*q^145 + q^169 + 2*q^193 + ...
		

Crossrefs

Cf. A001318 generalized pentagonal numbers, indices of odd values of a(n) and A000009.
Cf. A114913 = values k such that A000009(k) == 2 (mod 4) and such that a(k) == 2 (mod 4).

Programs

  • Mathematica
    a[ n_] := If[ n < 0, 0, With[{m = 24 n + 1}, Sum[ KroneckerSymbol[ -12, d] KroneckerSymbol[ 2, m/d], {d, Divisors @ m}]]]; (* Michael Somos, Jun 08 2013 *)
    a[ n_] := SeriesCoefficient[ EllipticTheta[ 4, 0, x^3] EllipticTheta[ 3, 0, x] / QPochhammer[ x, x^2], {x, 0, n}]; (* Michael Somos, Jun 08 2013 *)
  • PARI
    {a(n) = if( n<0, 0, n = 24*n + 1; sumdiv( n, d, kronecker( -12, d) * kronecker( 2, n/d)))}; /* Michael Somos, Mar 11 2007 */
    
  • PARI
    {a(n) = my(A); if( n<0, 0, A = x * O(x^n); polcoeff( eta(x^2 + A)^6 * eta(x^3 + A)^2 / (eta(x + A)^3 * eta(x^4 + A)^2 * eta(x^6 + A)), n))}; /* Michael Somos, Jun 08 2012 */

Formula

Expansion of phi(x) * phi(-x^3) / chi(-x) in powers of x where phi(), chi() are Ramanujan theta functions. - Michael Somos, Jun 08 2012
Expansion of f(x, x) * f(x, x^2) in powers of x where f(, ) is Ramanujan's general theta function. - Michael Somos, Jun 08 2013
Expansion of eta(q^2)^6 * eta(q^3)^2 / (eta(q)^3 * eta(q^4)^2 * eta(q^6)) in powers of q. - Michael Somos, Jun 08 2012
Euler transform of period 12 sequence [ 3, -3, 1, -1, 3, -4, 3, -1, 1, -3, 3, -2, ...]. - Michael Somos, Jun 08 2012
a(n) = A128580(12*n) = A129402(12*n) = A134177(12*n) = A190615(12*n). - Michael Somos, Jun 08 2012

A095115 a(1)=1. Given a(1),...,a(n-1), to find a(n), let S = {a(1), ..., a(n-1), |a(2)-a(1)|, ..., |a(n-1)-a(n-2)|}. Let d be the smallest positive integer not in S. Then a(n) is the smallest one of a(n-1)-d and a(n-1)+d which is a positive integer not in S union {d}.

Original entry on oeis.org

1, 3, 7, 12, 18, 10, 19, 30, 17, 31, 16, 36, 57, 35, 58, 34, 59, 33, 60, 32, 61, 98, 136, 97, 137, 96, 54
Offset: 1

Author

Dean Hickerson, following a suggestion of Leroy Quet, May 28 2004

Keywords

Examples

			For n=5, S={1,3,7,12, 2,4,5} so d=6. a(4)-d=6 is in S union {6}, so we have a(5)=a(4)+d=18.
a(28) does not exist: d=43, but both a(28)-43=11 and a(28)+43=97 are in S union {43}.
		

Crossrefs

Cf. A005228.

Programs

  • Mathematica
    mex1[s_]:=Module[{n}, For[n=1, MemberQ[s, n], n++, Null]; n]; a[1]=1; a[n_]:=a[n]=Module[{as, d}, as=a/@Range[n-1]; as=Union[as, Abs[Drop[as, 1]-Drop[as, -1]]]; AppendTo[as, d=mex1[as]]; If[a[n-1]-d>0&&!MemberQ[as, a[n-1]-d], a[n-1]-d, If[ !MemberQ[as, a[n-1]+d], a[n-1]+d], False]]

A095114 a(1)=1. a(n) = a(n-1) + (number of elements of {a(1),...,a(n-1)} that are <= n-1).

Original entry on oeis.org

1, 2, 4, 6, 9, 12, 16, 20, 24, 29, 34, 39, 45, 51, 57, 63, 70, 77, 84, 91, 99, 107, 115, 123, 132, 141, 150, 159, 168, 178, 188, 198, 208, 218, 229, 240, 251, 262, 273, 285, 297, 309, 321, 333, 345, 358, 371, 384, 397, 410, 423, 437, 451, 465, 479, 493, 507, 522
Offset: 1

Author

Dean Hickerson, following a suggestion of Leroy Quet, May 28 2004

Keywords

Comments

Every positive integer is either of the form a(n)+n-1 or of the form a(n+1)-a(n)+n, but not both.
The sequence a(n)+n-1 is A109512. - Robert Price, Apr 16 2013
The sequence a(n+1)-a(n)+n is A224731. - Robert Price, Apr 16 2013
Equals A001463 + 1, the partial sums of Golomb's sequence A001462. - Ralf Stephan, May 28 2004
a(n) is the position of the first occurrence of n in A001462, i.e., A001462(a(n)) = n and A001462(m) < n for m < a(n). - Reinhard Zumkeller, Feb 09 2012 [Explanation added and first inequality corrected from A001462(m) < m by Glen Whitney, Oct 06 2015]

Examples

			3 elements of {a(1),...,a(4)} are <= 4, so a(5) = a(4) + 3 = 9.
		

Crossrefs

Equals A001463(n) + 1.

Programs

  • Haskell
    a095114 n = a095114_list !! (n-1)
    a095114_list = 1 : f [1] 1 where
       f xs@(x:_) k = y : f (y:xs) (k+1) where
         y = x + length [z | z <- xs, z <= k]
    -- Reinhard Zumkeller, Feb 09 2012
  • Maple
    a[1]:= 1; m:= 0;
    for n from 2 to 100 do
      if a[m+1] <= n-1 then m:= m+1 fi;
      a[n]:= a[n-1]+m;
    od:
    seq(a[i],i=1..100); # Robert Israel, Oct 07 2015
  • Mathematica
    a[1]=1; a[n_]:=a[n]=a[n-1]+Length[Select[a/@Range[n-1], #
    				
  • PARI
    a(n) = sum(k=1, n-1, t(k)) + 1;
    t(n)=local(A, t, i); if(n<3, max(0, n), A=vector(n); t=A[i=2]=2; for(k=3, n, A[k]=A[k-1]+if(t--==0, t=A[i++ ]; 1)); A[n]);
    vector(100, n, a(n)) \\ Altug Alkan, Oct 06 2015
    

A095118 a(n) is the sum of the squares of the divisors of n which are <= sqrt(n).

Original entry on oeis.org

1, 1, 1, 5, 1, 5, 1, 5, 10, 5, 1, 14, 1, 5, 10, 21, 1, 14, 1, 21, 10, 5, 1, 30, 26, 5, 10, 21, 1, 39, 1, 21, 10, 5, 26, 66, 1, 5, 10, 46, 1, 50, 1, 21, 35, 5, 1, 66, 50, 30, 10, 21, 1, 50, 26, 70, 10, 5, 1, 91, 1, 5, 59, 85, 26, 50, 1, 21, 10, 79, 1, 130, 1, 5, 35, 21, 50, 50, 1, 110, 91
Offset: 1

Author

Dean Hickerson, following a suggestion of Leroy Quet, May 28 2004

Keywords

Examples

			The divisors of 12 which are <= sqrt(12) are 1,2,3, so a(12) = 1^2 + 2^2 + 3^2 = 14.
		

Crossrefs

Programs

  • Mathematica
    a[n_]:=Plus@@(Select[Divisors[n], #^2<=n&]^2)
    (* Second program: *)
    Table[DivisorSum[n, #^2 &, # <= Sqrt@ n &], {n, 81}] (* Michael De Vlieger, Dec 14 2017 *)
  • PARI
    N=100; x='x+O('x^N); Vec( sum(n=1, N, n^2*x^(n^2)/(1-x^n) ) ) \\ Joerg Arndt, Jan 02 2017
    
  • PARI
    a(n) = my(rn = sqrt(n)); sumdiv(n, d, d^2*(d<=rn)); \\ Michel Marcus, Jan 02 2017

Formula

G.f.: Sum_{n>=1} n^2*x^(n^2)/(1-x^n). - Joerg Arndt, Jan 30 2011

A095113 a(1)=1. a(n) is the sum of n/d over all divisors d of n which are among a(1), ..., a(n-1).

Original entry on oeis.org

1, 2, 3, 6, 5, 12, 7, 12, 12, 17, 11, 25, 13, 23, 23, 24, 18, 37, 19, 34, 31, 35, 24, 51, 31, 41, 36, 46, 29, 66, 32, 49, 47, 54, 48, 78, 38, 60, 55, 68, 42, 91, 43, 70, 69, 72, 48, 103, 57, 87, 72, 82, 53, 112, 72, 92, 80, 89, 59, 138, 61, 95, 93, 98, 83, 139, 67, 109, 96, 132
Offset: 1

Author

Dean Hickerson, following a suggestion of Leroy Quet, May 28 2004

Keywords

Examples

			The divisors of 8 are 1, 2, 4 and 8, of which only 1 and 2 occur among a(1), ..., a(7), so a(8) = 8/1 + 8/2 = 12.
		

Programs

  • Mathematica
    a[1]=1; a[n_]:=a[n]=Module[{as=a/@Range[n-1]}, Plus@@(If[MemberQ[as, # ], n/#, 0]& /@ Divisors[n])]
    Fold[Append[#1, Total[#2/Intersection[Divisors[#2], #1]]] &, {1}, Range[2, 70]] (* Ivan Neretin, Jun 20 2019 *)