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.

Showing 1-10 of 50 results. Next

A026119 Bisection of A000016 (also of A000013).

Original entry on oeis.org

1, 2, 4, 10, 30, 94, 316, 1096, 3856, 13798, 49940, 182362, 671092, 2485534, 9256396, 34636834, 130150588, 490853416, 1857283156, 7048151672, 26817356776, 102280151422, 390937468408, 1497207322930, 5744387279818, 22076468764192
Offset: 0

Views

Author

N. J. A. Sloane, Apr 12 2000

Keywords

Crossrefs

Bisection of A053634 and A053656.

Programs

  • PARI
    a(n) = sumdiv(2*n+1, d, eulerphi(d)*2^((2*n+1)/d)) / (4*n+2); \\ Michel Marcus, Sep 11 2013
    
  • Python
    from sympy import totient, divisors
    def A026119(n):
        m = (n<<1)+1
        return sum(totient(d)<Chai Wah Wu, Feb 21 2023

Formula

a(n) = (Sum_{d | 2n+1} phi(d)*2^((2n+1)/d)) / (4n+2).

A053734 A000016-A000048 (when they are lined up so that the two 16's match).

Original entry on oeis.org

0, 0, 1, 0, 1, 1, 1, 0, 2, 1, 1, 2, 1, 1, 5, 0, 1, 6, 1, 2, 11, 1, 1, 16, 4, 1, 30, 2, 1, 57, 1, 0, 95, 1, 13, 172, 1, 1, 317, 16, 1, 591, 1, 2, 1124, 1, 1, 2048, 10, 52, 3857, 2, 1, 7286, 97, 16, 13799, 1, 1, 26386, 1, 1, 49968, 0, 319, 95331, 1, 2, 182363
Offset: 1

Views

Author

N. J. A. Sloane, Mar 25 2000

Keywords

Programs

  • Maple
    f := proc(n) local d,sum1; sum1 := 0; for d from 1 to n do if d mod 2 = 1 and n mod d = 0 then sum1 := sum1+(phi(d)-mobius(d))*2^(n/d); fi; od; sum1/(2*n); end;
  • Mathematica
    Table[DivisorSum[n, Mod[#, 2] EulerPhi[#]*2^(n/#)/(2 n) &] - DivisorSum[n, Total[MoebiusMu[#]*2^(n/#)]/(2 n) &, OddQ], {n, 69}] (* Michael De Vlieger, Mar 26 2022 *)

A054539 A000016 / 2.

Original entry on oeis.org

1, 1, 2, 3, 5, 8, 15, 26, 47, 86, 158, 293, 548, 1024, 1928, 3643, 6899, 13108, 24970, 47663, 91181, 174768, 335546, 645278, 1242767, 2396746, 4628198, 8947868, 17318417, 33554432, 65075294, 126322568, 245426708
Offset: 3

Views

Author

N. J. A. Sloane, Apr 10 2000

Keywords

Crossrefs

A063776(n) / 4, n>2.

A057772 Inverse Euler transform of A000016.

Original entry on oeis.org

1, 0, 1, 0, 2, 1, 4, 4, 12, 15, 34, 55, 110, 190, 370, 664, 1272, 2350, 4466, 8372, 15926, 30105, 57390, 109202, 208738, 398985, 764906, 1467370, 2820770, 5427543, 10459456, 20176561, 38969684, 75339232, 145804978, 282429242, 547573768, 1062501151, 2063317650
Offset: 1

Views

Author

N. J. A. Sloane, Nov 02 2000

Keywords

References

  • P. J. Cameron, Some counting problems related to permutation groups, Discrete Math., 225 (2000), 77-92.

Programs

  • Maple
    with(numtheory): ietr:= proc(p) local a, c; c:= proc(n) option remember; local j; n*p(n)-add(c(j)*p(n-j), j=1..n-1) end; a:=proc(n) option remember; local d; `if`(n=0,1, add(mobius(n/d)*c(d), d=divisors(n))/n) end end: a:= ietr(n-> add(phi(d) *2^(n/d)/2/n, d=select(m-> modp(m,2)=1, divisors(n)))): seq(a(n), n=1..40); # Alois P. Heinz, Sep 08 2008
    # The function EulerInvTransform is defined in A358451.
    a := EulerInvTransform(A000016):
    seq(a(n), n = 1..39); # Peter Luschny, Nov 21 2022
  • Mathematica
    ietr[p_] := Module[{a, c}, c[n_] := c[n] = Module[{j}, n*p[n] - Sum[c[j]*p[n-j], {j, 1, n-1}]]; a[n_] := a[n] = Module[{d}, If[n == 0, 1, Sum[MoebiusMu[n/d]*c[d], {d, Divisors[n]}]/n]]; a]; a = ietr[Function[n, Sum[EulerPhi[d]*2^(n/d)/2/n, {d, Select[Divisors[n], OddQ]}]]]; Table[a[n], {n, 1, 40}] (* Jean-François Alcover, Jan 17 2014, after Alois P. Heinz *)

Extensions

Better definition and more terms from Vladeta Jovovic, Mar 13 2008

A300668 a(n) = A000016(2*n).

Original entry on oeis.org

1, 1, 2, 6, 16, 52, 172, 586, 2048, 7286, 26216, 95326, 349536, 1290556, 4793492, 17895736, 67108864, 252645136, 954437292, 3616814566, 13743895360, 52357696956, 199911205052, 764877654106, 2932031008768, 11258999068468, 43303842570872, 166799986203766, 643371375338656, 2484744621997516
Offset: 0

Views

Author

Seiichi Manyama, Mar 10 2018

Keywords

Crossrefs

Cf. A000010 (phi), A000016, A300628.

Programs

  • Mathematica
    a[n_] := DivisorSum[n, EulerPhi[#] * 4^(n/#) &, OddQ[#] &] / (4*n); a[0] = 1; Array[a, 30, 0] (* Amiram Eldar, Oct 04 2023 *)
  • PARI
    a(n) = if (n==0, 1, sumdiv(n, d, if (d % 2, eulerphi(d)*4^(n/d)))/(4*n));  \\ Michel Marcus, Mar 11 2018

Formula

a(n) = (1/(4*n)) * Sum_{odd d divides n} phi(d)*4^(n/d) for n > 0.
a(n+1) = A300628(n,0).

A133670 Partial sums of A000016.

Original entry on oeis.org

1, 2, 3, 5, 7, 11, 17, 27, 43, 73, 125, 219, 391, 707, 1293, 2389, 4437, 8293, 15579, 29377, 55593, 105533, 200859, 383221, 732757, 1403849, 2694405, 5179939, 9973431, 19229827, 37125563, 71762397, 138871261, 269021849, 521666985
Offset: 0

Views

Author

Jonathan Vos Post, Dec 29 2007

Keywords

Crossrefs

Cf. A000016.

Extensions

Typo in a(25) corrected by Giovanni Resta, Jun 20 2016

A000031 Number of n-bead necklaces with 2 colors when turning over is not allowed; also number of output sequences from a simple n-stage cycling shift register; also number of binary irreducible polynomials whose degree divides n.

Original entry on oeis.org

1, 2, 3, 4, 6, 8, 14, 20, 36, 60, 108, 188, 352, 632, 1182, 2192, 4116, 7712, 14602, 27596, 52488, 99880, 190746, 364724, 699252, 1342184, 2581428, 4971068, 9587580, 18512792, 35792568, 69273668, 134219796, 260301176, 505294128, 981706832
Offset: 0

Views

Author

Keywords

Comments

Also a(n)-1 is the number of 1's in the truth table for the lexicographically least de Bruijn cycle (Fredricksen).
In music, a(n) is the number of distinct classes of scales and chords in an n-note equal-tempered tuning system. - Paul Cantrell, Dec 28 2011
Also, minimum cardinality of an unavoidable set of length-n binary words (Champarnaud, Hansel, Perrin). - Jeffrey Shallit, Jan 10 2019
(1/n) * Dirichlet convolution of phi(n) and 2^n, n>0. - Richard L. Ollerton, May 06 2021
From Jianing Song, Nov 13 2021: (Start)
a(n) is even for n != 0, 2. Proof: write n = 2^e * s with odd s, then a(n) * s = Sum_{d|s} Sum_{k=0..e} phi((2^e*s)/(2^k*d)) * 2^(2^k*d-e) = Sum_{d|s} Sum_{k=0..e-1} phi(s/d) * 2^(2^k*d-k-1) + Sum_{d|s} phi(s/d) * 2^(2^e*d-e) == Sum_{k=0..e-1} 2^(2^k*s-k-1) + 2^(2^e*s-e) == Sum_{k=0..min{e-1,1}} 2^(2^k*s-k-1) (mod 2). a(n) is odd if and only if s = 1 and e-1 = 0, or n = 2.
a(n) == 2 (mod 4) if and only if n = 1, 4 or n = 2*p^e with prime p == 3 (mod 4).
a(n) == 4 (mod 8) if and only if n = 2^e, 3*2^e for e >= 3, or n = p^e, 4*p^e != 12 with prime p == 3 (mod 4), or n = 2s where s is an odd number such that phi(s) == 4 (mod 8). (End)

Examples

			For n=3 and n=4 the necklaces are {000,001,011,111} and {0000,0001,0011,0101,0111,1111}.
The analogous shift register sequences are {000..., 001001..., 011011..., 111...} and {000..., 00010001..., 00110011..., 0101..., 01110111..., 111...}.
		

References

  • S. W. Golomb, Shift-Register Sequences, Holden-Day, San Francisco, 1967, pp. 120, 172.
  • May, Robert M. "Simple mathematical models with very complicated dynamics." Nature, Vol. 261, June 10, 1976, pp. 459-467; reprinted in The Theory of Chaotic Attractors, pp. 85-93. Springer, New York, NY, 2004. The sequences listed in Table 2 are A000079, A027375, A000031, A001037, A000048, A051841. - N. J. A. Sloane, Mar 17 2019
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
  • R. P. Stanley, Enumerative Combinatorics, Cambridge, Vol. 2, 1999; see Problem 7.112(a).

Crossrefs

Column 2 of A075195.
Cf. A001037 (primitive solutions to same problem), A014580, A000016, A000013, A000029 (if turning over is allowed), A000011, A001371, A058766.
Rows sums of triangle in A047996.
Dividing by 2 gives A053634.
A008965(n) = a(n) - 1 allowing different offsets.
Cf. A008965, A053635, A052823, A100447 (bisection).
Cf. A000010.

Programs

  • Haskell
    a000031 0 = 1
    a000031 n = (`div` n) $ sum $
       zipWith (*) (map a000010 divs) (map a000079 $ reverse divs)
       where divs = a027750_row n
    -- Reinhard Zumkeller, Mar 21 2013
    
  • Maple
    with(numtheory); A000031 := proc(n) local d,s; if n = 0 then RETURN(1); else s := 0; for d in divisors(n) do s := s+phi(d)*2^(n/d); od; RETURN(s/n); fi; end; [ seq(A000031(n), n=0..50) ];
  • Mathematica
    a[n_] := Sum[If[Mod[n, d] == 0, EulerPhi[d] 2^(n/d), 0], {d, 1, n}]/n
    a[n_] := Fold[#1 + 2^(n/#2) EulerPhi[#2] &, 0, Divisors[n]]/n (* Ben Branman, Jan 08 2011 *)
    Table[Expand[CycleIndex[CyclicGroup[n], t] /. Table[t[i]-> 2, {i, 1, n}]], {n,0, 30}] (* Geoffrey Critzer, Mar 06 2011*)
    a[0] = 1; a[n_] := DivisorSum[n, EulerPhi[#]*2^(n/#)&]/n; Table[a[n], {n, 0, 40}] (* Jean-François Alcover, Feb 03 2016 *)
    mx=40; CoefficientList[Series[1-Sum[EulerPhi[i] Log[1-2*x^i]/i,{i,1,mx}],{x,0,mx}],x] (*Herbert Kociemba, Oct 29 2016 *)
  • PARI
    {A000031(n)=if(n==0,1,sumdiv(n,d,eulerphi(d)*2^(n/d))/n)} \\ Randall L Rathbun, Jan 11 2002
    
  • Python
    from sympy import totient, divisors
    def A000031(n): return sum(totient(d)*(1<Chai Wah Wu, Nov 16 2022

Formula

a(n) = (1/n)*Sum_{ d divides n } phi(d)*2^(n/d) = A053635(n)/n, where phi is A000010.
Warning: easily confused with A001037, which has a similar formula.
G.f.: 1 - Sum_{n>=1} phi(n)*log(1 - 2*x^n)/n. - Herbert Kociemba, Oct 29 2016
a(0) = 1; a(n) = (1/n) * Sum_{k=1..n} 2^gcd(n,k). - Ilya Gutkovskiy, Apr 16 2021
a(0) = 1; a(n) = (1/n)*Sum_{k=1..n} 2^(n/gcd(n,k))*phi(gcd(n,k))/phi(n/gcd(n,k)). - Richard L. Ollerton, May 06 2021
Dirichlet g.f.: f(s+1) * (zeta(s)/zeta(s+1)), where f(s) = Sum_{n>=1} 2^n/n^s. - Jianing Song, Nov 13 2021

Extensions

There is an error in Fig. M3860 in the 1995 Encyclopedia of Integer Sequences: in the third line, the formula for A000031 = M0564 should be (1/n) sum phi(d) 2^(n/d).

A237984 Number of partitions of n whose mean is a part.

Original entry on oeis.org

1, 2, 2, 3, 2, 5, 2, 6, 5, 8, 2, 21, 2, 14, 22, 30, 2, 61, 2, 86, 67, 45, 2, 283, 66, 80, 197, 340, 2, 766, 2, 663, 543, 234, 703, 2532, 2, 388, 1395, 4029, 2, 4688, 2, 4476, 7032, 1005, 2, 17883, 2434, 9713, 7684, 14472, 2, 25348, 17562, 37829, 16786, 3721
Offset: 1

Views

Author

Clark Kimberling, Feb 27 2014

Keywords

Comments

a(n) = 2 if and only if n is a prime.

Examples

			a(6) counts these partitions:  6, 33, 321, 222, 111111.
From _Gus Wiseman_, Sep 14 2019: (Start)
The a(1) = 1 through a(10) = 8 partitions (A = 10):
  1  2   3    4     5      6       7        8         9          A
     11  111  22    11111  33      1111111  44        333        55
              1111         222              2222      432        22222
                           321              3221      531        32221
                           111111           4211      111111111  33211
                                            11111111             42211
                                                                 52111
                                                                 1111111111
(End)
		

Crossrefs

Cf. A238478.
The Heinz numbers of these partitions are A327473.
A similar sequence for subsets is A065795.
Dominated by A067538.
The strict case is A240850.
Partitions without their mean are A327472.

Programs

  • Mathematica
    Table[Count[IntegerPartitions[n], p_ /; MemberQ[p, Mean[p]]], {n, 40}]
  • Python
    from sympy.utilities.iterables import partitions
    def A237984(n): return sum(1 for s,p in partitions(n,size=True) if not n%s and n//s in p) # Chai Wah Wu, Sep 21 2023

Formula

a(n) = A000041(n) - A327472(n). - Gus Wiseman, Sep 14 2019

A000048 Number of n-bead necklaces with beads of 2 colors and primitive period n, when turning over is not allowed but the two colors can be interchanged.

Original entry on oeis.org

1, 1, 1, 1, 2, 3, 5, 9, 16, 28, 51, 93, 170, 315, 585, 1091, 2048, 3855, 7280, 13797, 26214, 49929, 95325, 182361, 349520, 671088, 1290555, 2485504, 4793490, 9256395, 17895679, 34636833, 67108864, 130150493, 252645135, 490853403, 954437120, 1857283155
Offset: 0

Views

Author

Keywords

Comments

Also, for any m which is a multiple of n, the number of 2m-bead balanced binary necklaces of fundamental period 2n that are equivalent to their complements. [Clarified by Aaron Meyerowitz, Jun 01 2024]
Also binary Lyndon words of length n with an odd number of 1's (for n>=1).
Also number of binary irreducible polynomials of degree n having trace 1.
Also number of binary irreducible polynomials of degree n having linear coefficient 1 (this is the same as the trace-1 condition, as the reciprocal of an irreducible polynomial is again irreducible).
Also number of binary irreducible self-reciprocal polynomials of degree 2*n; there is no such polynomial for odd degree except for x+1.
Also number of binary vectors (x_1,...x_n) satisfying Sum_{i=1..n} i*x_i = 1 (mod n+1) = size of Varshamov-Tenengolts code VT_1(n).
Also the number of dynamical cycles of period 2n of a threshold Boolean automata network which is a quasi-minimal negative circuit of size nq where q is odd and which is updated in parallel. - Mathilde Noual (mathilde.noual(AT)ens-lyon.fr), Mar 03 2009
Also the number of 3-elements orbits of the symmetric group S3 action on irreducible polynomials of degree 2n, n>1, over GF(2). - Jean Francis Michon, Philippe Ravache (philippe.ravache(AT)univ-rouen.fr), Oct 04 2009
Conjecture: Also the number of caliber-n cycles of Zagier-reduced indefinite binary quadratic forms with sum invariant equal to s, where (s-1)/n is an odd integer. - Barry R. Smith, Dec 14 2014
The Metropolis, Stein, Stein (1973) reference on page 31 Table II lists a(k) for k = 2 to 15 and is actually for sequence A056303 since there a(k) = 0 for k<2. - Michael Somos, Dec 20 2014

Examples

			a(5) = 3 corresponding to the necklaces 00001, 00111, 01011.
a(6) = 5 from 000001, 000011, 000101, 000111, 001011.
		

References

  • B. D. Ginsburg, On a number theory function applicable in coding theory, Problemy Kibernetiki, No. 19 (1967), pp. 249-252.
  • H. Kawakami, Table of rotation sequences of x_{n+1} = x_n^2 - lambda, pp. 73-92 of G. Ikegami, Editor, Dynamical Systems and Nonlinear Oscillations, Vol. 1, World Scientific, 1986.
  • Robert M. May, "Simple mathematical models with very complicated dynamics." Nature, Vol. 261, June 10, 1976, pp. 459-467; reprinted in The Theory of Chaotic Attractors, pp. 85-93. Springer, New York, NY, 2004. The sequences listed in Table 2 are A000079, A027375, A000031, A001037, A000048, A051841. - N. J. A. Sloane, Mar 17 2019
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Like A000013, but primitive necklaces. Half of A064355.
Equals A042981 + A042982.
Cf. also A001037, A056303.
Very close to A006788 [Fisher, 1989].
bisection (odd terms) is A131203

Programs

  • Maple
    with(numtheory); A000048 := proc(n) local d,t1; if n = 0 then RETURN(1) else t1 := 0; for d from 1 to n do if n mod d = 0 and d mod 2 = 1 then t1 := t1+mobius(d)*2^(n/d)/(2*n); fi; od; RETURN(t1); fi; end;
  • Mathematica
    a[n_] := Total[ MoebiusMu[#]*2^(n/#)& /@ Select[ Divisors[n], OddQ]]/(2n); a[0] = 1; Table[a[n], {n,0,35}] (* Jean-François Alcover, Jul 21 2011 *)
    a[ n_] := If[ n < 1, Boole[n == 0], DivisorSum[ n, MoebiusMu[#] 2^(n/#) &, OddQ] / (2 n)]; (* Michael Somos, Dec 20 2014 *)
  • PARI
    A000048(n) = sumdiv(n,d,(d%2)*(moebius(d)*2^(n/d)))/(2*n) \\ Michael B. Porter, Nov 09 2009
    
  • PARI
    L(n, k) = sumdiv(gcd(n,k), d, moebius(d) * binomial(n/d, k/d) );
    a(n) = sum(k=0, n, if( (n+k)%2==1, L(n, k), 0 ) ) / n;
    vector(55,n,a(n)) \\ Joerg Arndt, Jun 28 2012
    
  • Python
    from sympy import divisors, mobius
    def a(n): return 1 if n<1 else sum(mobius(d)*2**(n//d) for d in divisors(n) if d%2)//(2*n) # Indranil Ghosh, Apr 28 2017

Formula

a(n) = (1/(2*n)) * Sum_{odd d divides n} mu(d)*2^(n/d), where mu is the Mobius function A008683.
a(n) = A056303(n) for all integer n>=2. - Michael Somos, Dec 20 2014
Sum_{k dividing m for which m/k is odd} k*a(k) = 2^(m-1). (This explains the observation that the sequence is very close to A006788. Unless m has some nontrivial odd divisors that are small relative to m, the term m*a(m) will dominate the sum. Thus, we see for instance that a(n) = A006788(n) when n has one of the forms 2^m or 2^m*p where p is an odd prime with a(2^m) < p.) - Barry R. Smith, Oct 24 2015
A000013(n) = Sum_{d|n} a(d). - Robert A. Russell, Jun 09 2019
G.f.: 1 + Sum_{k>=1} mu(2*k)*log(1 - 2*x^k)/(2*k). - Ilya Gutkovskiy, Nov 11 2019

Extensions

Additional comments from Frank Ruskey, Dec 13 1999

A327473 Heinz numbers of integer partitions whose mean A326567/A326568 is a part.

Original entry on oeis.org

2, 3, 4, 5, 7, 8, 9, 11, 13, 16, 17, 19, 23, 25, 27, 29, 30, 31, 32, 37, 41, 43, 47, 49, 53, 59, 61, 64, 67, 71, 73, 79, 81, 83, 84, 89, 90, 97, 101, 103, 105, 107, 109, 110, 113, 121, 125, 127, 128, 131, 137, 139, 149, 151, 157, 163, 167, 169, 173, 179, 181
Offset: 1

Views

Author

Gus Wiseman, Sep 13 2019

Keywords

Comments

The Heinz number of an integer partition (y_1,...,y_k) is prime(y_1)*...*prime(y_k).

Examples

			The sequence of terms together with their prime indices begins:
   2: {1}
   3: {2}
   4: {1,1}
   5: {3}
   7: {4}
   8: {1,1,1}
   9: {2,2}
  11: {5}
  13: {6}
  16: {1,1,1,1}
  17: {7}
  19: {8}
  23: {9}
  25: {3,3}
  27: {2,2,2}
  29: {10}
  30: {1,2,3}
  31: {11}
  32: {1,1,1,1,1}
  37: {12}
		

Crossrefs

A subsequence of A316413.
Complement of A327476.
The enumeration of these partitions by sum is given by A237984.
Subsets whose mean is a part are A065795.
Numbers whose binary indices include their mean are A327478.

Programs

  • Mathematica
    primeMS[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    Select[Range[100],MemberQ[primeMS[#],Mean[primeMS[#]]]&]
Showing 1-10 of 50 results. Next