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: Max Sills

Max Sills's wiki page.

Max Sills has authored 9 sequences.

A189896 Weak Ackermann numbers: H_n(n,n) where H_n is the n-th hyperoperator.

Original entry on oeis.org

1, 2, 4, 27
Offset: 0

Author

Max Sills, Apr 30 2011

Keywords

Comments

The next term, a(4), has about 8*10^153 decimal digits. - Charles R Greathouse IV, Nov 15 2022

Examples

			a(0) = succ(0) = 0 + 1 = 1, because the zeroth hyperoperation is successor.
a(1) = 1 + 1 = 2, because the first hyperoperation is addition.
a(2) = 2 * 2 = 4, because the second hyperoperation is multiplication.
a(3) = 3^3 = 27, because the third hyperoperation is exponentiation.
a(4) = 4^4^4^4 = 4^(4^(4^4)) = 4^(4^256), because the fourth hyperoperation is tetration. The term is too big to be included: log_2(a(4)) = 2^513.
		

Crossrefs

For H_n(x,x) with fixed x, cf. A054871 (x=3, shifted), A141044 (x=1), A253855 (x=4, shifted), A255176 (x=2), A256131 (x=10, shifted). - Danny Rorabaugh, Oct 20 2015
Cf. A271553 ( H_n-1(n,n) ). - Natan Arie Consigli, Apr 10 2016

Formula

a(n) = H_n(n, n), where H_n the hyperoperation indexed by n.

Extensions

"Weak" added to definition by Natan Arie Consigli, Apr 18 2015

A136441 Number of rotational symmetries in the binary expansion of a number with 0 appended to the front.

Original entry on oeis.org

2, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 3, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
Offset: 0

Author

Max Sills, Apr 03 2008

Keywords

Examples

			a(0) = 2 because 00 has two rotational symmetries; a(21) = 3 because 010101 has 3 rotational symmetries.
		

Crossrefs

Cf. A138904.

A137389 a(n) = 2^prime(n) + 2^prime(n+1).

Original entry on oeis.org

12, 40, 160, 2176, 10240, 139264, 655360, 8912896, 545259520, 2684354560, 139586437120, 2336462209024, 10995116277760, 149533581377536, 9147936743096320, 585467951558164480, 2882303761517117440, 149879795598890106880, 2508757194024499019776, 11805916207174113034240
Offset: 1

Author

Max Sills, Apr 10 2008

Keywords

Examples

			a(3) = 160 because 2^5 + 2^7 = 160.
		

Crossrefs

Programs

Formula

a(n) = A034785(n) + A034785(n+1). [R. J. Mathar, Jun 15 2009]
a(n) = 4*A137781(n). - Wesley Ivan Hurt, Mar 27 2015

Extensions

More terms from N. J. A. Sloane, Apr 10 2008

A137323 a(n) = sum(d divides n, 2^(n/d-1) - 1 ), omitting d=1 and d=n.

Original entry on oeis.org

0, 0, 0, 1, 0, 4, 0, 8, 3, 16, 0, 42, 0, 64, 18, 135, 0, 290, 0, 534, 66, 1024, 0, 2216, 15, 4096, 258, 8262, 0, 16944, 0, 32902, 1026, 65536, 78, 133415, 0, 262144, 4098, 524948, 0, 1056864, 0, 2098182, 16656, 4194304, 0, 8423590, 63, 16777742
Offset: 1

Author

Max Sills, Apr 06 2008

Keywords

Comments

Previous name was: Characteristic value of numbers used to compute number of binary expansions of a certain length that have a given number of rotational symmetries.
Sequence is useful in counting binary expansions of length l with r rotational symmetries (we only consider r>1), where r has to be a proper divisor not equal to 1.
We discount numbers with l symmetry, because we know this only occurs once, at (2^l) - 1.
For example, consider binary expansions of length 8. We know that for any number the possible symmetries are the proper divisors of 8 not equal to 1; (2, 4).
So if we would like to find the number of expansions of length 8 that have 2 rotational symmetries, it is [2^(8/2 -1) -1] - a(8/2) = 7 - 1 = 6.
In general it appears that the formula for r rotational-symmetric numbers of expansion length l is the following: [2^(l/r -1) -1] - a(l/r).

Examples

			a(6) = 4 because 6 has (2,3) as proper divisors not equal to one. Plugging these values into the formula we get [2^(6/2 -1)-1] + [2^(6/3 -1) -1] = 3 + 1 = 4.
For p prime, a(p) = 0.
		

References

  • John B. Fraleigh, A first course in abstract algebra, Pearson Education, 2003.

Crossrefs

Cf. A138904.

Programs

  • Mathematica
    a[1] = 0; a[n_] := Sum[2^(n/d - 1) - 1, {d, Divisors[n][[2 ;; -2]]}];
    Array[a, 50] (* Jean-François Alcover, Nov 12 2017 *)
  • PARI
    a(n) = sumdiv(n, d, if ((d==1) || (d==n), 0, 2^((n/d -1)) -1)); \\ Michel Marcus, Aug 13 2013

Formula

a(n) = sum(d divides n, 2^(n/d-1) - 1 ), omitting d=1 and d=n.

Extensions

Corrected, extended, and new name by Michel Marcus, Aug 13 2013

A138954 Number of complement symmetries in the rotations of the binary expansion of a number.

Original entry on oeis.org

0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 2, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
Offset: 0

Author

Max Sills, Apr 03 2008

Keywords

Comments

It seems that the number of complement rotational symmetries is nonzero iff #0 = #1 in the binary expansion of a number.
The above statement is true in only one direction. It is clearly necessary for the number of 1 bits to equal the number of 0 bits. However, this is not sufficient. The first counterexample is n = 37 with binary expansion 100101 and complement 011010. Values of n for which a(n) is nonzero are therefore a proper subset of A031443. - Andrew Howroyd, Jan 12 2020

Examples

			a(2) = 1 because 2 has binary expansion 10 and the complement shows up once in rotations;
a(10) = 2 because 10 has binary expansion 1010 and its complement shows up twice in rotations.
		

Crossrefs

Programs

  • PARI
    a(n)={my(s=0); if(n, my(b=logint(n,2)+1); if(2*hammingweight(n)==b, my(w=2^b-1-n); for(i=2, b, w=if(w%2, w+2^b, w)\2; if(w==n, s++)))); s} \\ Andrew Howroyd, Jan 12 2020

Extensions

Missing a(8) inserted and terms a(21) and beyond from Andrew Howroyd, Jan 12 2020

A138904 Number of rotational symmetries in the binary expansion of a number.

Original entry on oeis.org

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

Author

Max Sills, Apr 03 2008, Apr 04 2008

Keywords

Comments

Mersenne numbers of form (2^n - 1) have n rotational symmetries.
For prime length binary expansions these are the only nontrivial symmetries.
For composite length expansions it seems that when the number of symmetries is nontrivial it is equal to a factor of the length. We're working on an explicit formula.
Discovered in the context of random circulant matrices, examining if there's a correlation between degrees of freedom and number of symmetries in the first row.
When combined with A138954, these two sequences should give a full account of the number of redundant rows in a circulant square matrix with at most two distinct values, where a(n) is the encoding of the first row of the matrix into binary such that value a = 1 and value b = 0.
Discovered on the night of Apr 02, 2008 by Maxwell Sills and Gary Doran.
Conjecture: For binary expansions of length n, there are d(n) distinct values that will show up as symmetries, where d is the divisor function. The symmetry values will be precisely the divisors of n.
Example: for binary expansions of length 12, one sees that d(12) = 6 distinct values show up as symmetries (1, 2, 3, 4, 6, 12).
Conjecture: For numbers whose binary expansion has length n which has proper divisors which are all coprime: There will be only one number of length n with n symmetries. That number is 2^n - 1. For each proper divisor d (excluding 1), you can generate all numbers of length n that have n/d symmetries like so: (2^0 + 2^d + 2^2d ... 2^(n-d)) * a, where 2^(d-1) <= a < (2^d) - 1. The rest of the expansions of length n will have only the trivial symmetry.
Also the number of rotational symmetries of the n-th composition in standard order (graded reverse-lexicographic). This composition (row n of A066099) is obtained by taking the set of positions of 1's in the reversed binary expansion of n, prepending 0, taking first differences, and reversing again. - Gus Wiseman, Apr 19 2020
From Gus Wiseman, Apr 19 2020: (Start)
Aperiodic compositions are counted by A000740.
Aperiodic binary words are counted by A027375.
The orderless period of prime indices is A052409.
Numbers whose binary expansion is periodic are A121016.
Periodic compositions are counted by A178472.
Period of binary expansion is A302291.
Compositions by sum and number of distinct rotations are A333941.
All of the following pertain to compositions in standard order (A066099):
- Length is A000120.
- Necklaces are A065609.
- Sum is A070939.
- Runs are counted by A124767.
- Strict compositions are A233564.
- Constant compositions are A272919.
- Lyndon compositions are A275692.
- Co-Lyndon compositions are A326774.
- Aperiodic compositions are A328594.
- Reversed co-necklaces are A328595.
- Rotational period is A333632.
- Co-necklaces are A333764.
- Reversed necklaces are A333943.
(End).

Examples

			a(10) = 2 because the binary expansion of 10 is 1010 and it has two rotational symmetries (including identity).
		

Crossrefs

Programs

  • Mathematica
    Table[IntegerLength[n,2]/Length[Union[Array[RotateRight[IntegerDigits[n,2],#]&,IntegerLength[n,2]]]],{n,100}] (* Gus Wiseman, Apr 19 2020 *)

Formula

a(n) = A070939(n)/A302291(n) = A000120(n)/A333632(n). - Gus Wiseman, Apr 19 2020

A137324 a(n) = Sum_{prime p < n} gcd(n,p).

Original entry on oeis.org

1, 3, 2, 6, 3, 5, 6, 9, 4, 8, 5, 13, 12, 7, 6, 10, 7, 13, 16, 19, 8, 12, 13, 22, 11, 16, 9, 17, 10, 12, 23, 28, 21, 14, 11, 31, 26, 17, 12, 22, 13, 25, 20, 37, 14, 18, 21, 20, 33, 28, 15, 19, 30, 23, 36, 45, 16, 24, 17, 49, 26, 19, 34, 31, 18, 36, 43, 30, 19, 23, 20, 58, 27, 40, 37
Offset: 3

Author

Max Sills, Apr 06 2008

Keywords

Examples

			a(10) = 9 because gcd(10,2) = 2, gcd(10,3) = 1, gcd(10,5) = 5, gcd(10,7) = 1; 2 + 1 + 5 + 1 = 9.
The underlying irregular table of gcd(n,2), gcd(n,3), gcd(n,5), gcd(n,7), etc., for which a(n) provides row sums, is obtained by deleting columns from A050873(n,k) and looks as follows for n=3,4,5,...:
  1
  2 1
  1 1
  2 3 1
  1 1 1
  2 1 1 1
  1 3 1 1
  2 1 5 1
  1 1 1 1
  2 3 1 1 1
  1 1 1 1 1
  2 1 1 7 1 1
  1 3 5 1 1 1
  2 1 1 1 1 1
  1 1 1 1 1 1
  2 3 1 1 1 1 1
  1 1 1 1 1 1 1
  2 1 5 1 1 1 1 1
		

Crossrefs

Programs

  • Magma
    [&+[Gcd(n,p):p in PrimesInInterval(1,n-1)]:n in [3..77]]; // Marius A. Burtea, Aug 07 2019
    
  • Maple
    A137324 := proc(n) local a,i; a :=0 ; for i from 1 to numtheory[pi](n-1) do a := a+gcd(n,ithprime(i)) ; od: a; end: seq(A137324(n),n=3..80) ; # R. J. Mathar, Apr 09 2008
  • Mathematica
    Table[Plus @@ GCD[n, Select[Range[n - 1], PrimeQ[ # ] &]], {n, 3, 70}] (* Stefan Steinerberger, Apr 09 2008 *)
  • PARI
    a(n) = sum(k=1, n-1, gcd(n,k)*isprime(k)); \\ Michel Marcus, Nov 07 2014
    
  • Python
    from math import gcd
    from sympy import primerange
    def a(n): return sum(gcd(n, p) for p in primerange(1, n))
    print([a(n) for n in range(3, 78)]) # Michael S. Branicky, Nov 21 2021

Formula

a(p) = A000720(p) - 1 for prime p. - R. J. Mathar, Apr 09 2008
a(n) = A048865(n) + A105221(n). - Wesley Ivan Hurt, Nov 21 2021

Extensions

Corrected and extended by R. J. Mathar and Stefan Steinerberger, Apr 09 2008

A136494 Number of permutation symmetries in the binary expansion of n.

Original entry on oeis.org

1, 1, 1, 2, 2, 2, 2, 6, 6, 4, 4, 6, 4, 6, 6, 24, 24, 12, 12, 12, 12, 12, 12, 24, 12, 12, 12, 24, 12, 24, 24, 120, 120, 48, 48, 36, 48, 36, 36, 48, 48, 36, 36, 48, 36, 48, 48, 120, 48, 36, 36, 48, 36, 48, 48, 120, 36, 48, 48, 120, 48, 120, 120, 720, 720
Offset: 0

Author

Max Sills, Apr 13 2008

Keywords

Examples

			a(14) = 6 because there are 3! permutation symmetries of 1's * the 0! permutation symmetries of 0's.
		

Crossrefs

Programs

  • Mathematica
    a[n_] := Times @@ (DigitCount[n, 2]!); Array[a, 65, 0] (* Amiram Eldar, Jul 29 2023 *)
  • PARI
    a(n) = {if(n==0, 1, my(w=hammingweight(n)); w!*(1+logint(n,2)-w)!)} \\ Andrew Howroyd, Jan 12 2020

Formula

a(n) = A093659(n) * A139329(n).
a(n) = A000120(n)! * A080791(n)!.

Extensions

Terms a(32) and beyond from Andrew Howroyd, Jan 12 2020

A139329 a(n) = (factorial of the number of 0's in the binary expansion of n).

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 1, 1, 6, 2, 2, 1, 2, 1, 1, 1, 24, 6, 6, 2, 6, 2, 2, 1, 6, 2, 2, 1, 2, 1, 1, 1, 120, 24, 24, 6, 24, 6, 6, 2, 24, 6, 6, 2, 6, 2, 2, 1, 24, 6, 6, 2, 6, 2, 2, 1, 6, 2, 2, 1, 2, 1, 1, 1, 720, 120, 120, 24, 120, 24, 24, 6, 120, 24, 24, 6, 24, 6, 6, 2, 120, 24, 24, 6, 24, 6, 6, 2, 24, 6, 6, 2, 6, 2, 2, 1, 120
Offset: 0

Author

Max Sills, Apr 13 2008

Keywords

Comments

Number of permutation symmetries of the 0's in the binary expansion of n. Consider the symmetric group that permutes floor(log_2(n)) elements acting on the 0's.

Crossrefs

Cf. A000142, A023416, A080791, A093659 (factorial of the number of 1's in binary expansion of n).

Programs

  • Mathematica
    a[n_] := DigitCount[n, 2, 0]!; Array[a, 100, 0] (* Amiram Eldar, Jul 29 2023 *)
  • PARI
    a(n) = (#binary(n)-hammingweight(n))!; \\ Michel Marcus, Oct 24 2017

Formula

a(n) = A000142(A023416(n)) = A000142(A080791(n)). - Antti Karttunen, Oct 24 2017

Extensions

Locations of the name and the formula changed, more terms from Antti Karttunen, Oct 24 2017