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: Gerard P. Michon

Gerard P. Michon's wiki page.

Gerard P. Michon has authored 28 sequences. Here are the ten most recent ones:

A217592 Integers that are cut in half by cycling all the decimal digits one place to the left.

Original entry on oeis.org

0, 105263157894736842, 210526315789473684, 315789473684210526, 421052631578947368, 526315789473684210, 631578947368421052, 736842105263157894, 842105263157894736, 947368421052631578, 105263157894736842105263157894736842, 210526315789473684210526315789473684
Offset: 0

Author

Gerard P. Michon, Oct 28 2012

Keywords

Comments

A rotation of the decimal digits to the left puts the leading digit in the rightmost position (123456 becomes 234561). The (even) integers that are cut in half by this operation form 10 families; a singleton {a(0)=0} and 9 infinite families, each consisting of any number of repetitions of an 18-digit pattern.
Each of those families corresponds to a single decadic solution of the equation x=2(10x+d) where d is a digit from 0 to 9 (namely x=-2d/19 which is a periodic decadic).
This sequence is strongly related to A146088:
A146088(8k+1) = a(9k+2)/2 = a(9k+1)
A146088(8k+2) = a(9k+3)/2
A146088(8k+3) = a(9k+4)/2 = a(9k+2)
A146088(8k+4) = a(9k+5)/2
A146088(8k+5) = a(9k+6)/2 = a(9k+3)
A146088(8k+6) = a(9k+7)/2
A146088(8k+7) = a(9k+8)/2 = a(9k+4)
A146088(8k+8) = a(9k+9)/2
Note that a(9k+1)/2 is not part of A146088, because rotating one place to the left a decimal expansion starting with 105263157894736842 yields a discarded zero leading digit which is not retrieved by rotating the digits to the right (right-rotation would double the pattern 052631578947368421 but not the number 52631578947368421).
Lists normally have offset 1, but there is a good reason to make an exception in this case. - N. J. A. Sloane, Dec 24 2012

Examples

			a(0) = 0 because rotating a lone zero gives 0 = 0/2.
a(1) = 105263157894736842 because its half equals 052631578947368421 (discarding leading 0).
a(3) = 315789473684210526 since a(3)/2 = 157894736842105263.
		

Crossrefs

A146088(8k+i)=a(9k+i+1)/2 for i=1..8 and any k.

Formula

a(j)=j*105263157894736842 for j = 0 to 9
a(n+9)=10^18*a(n) + a(n) mod 10^18 for n>0
a(9k-9+j) = j*a(1)*(10^18k-1)/(10^18-1) for j=1..9 and k>0
e.g., a(1000) = a(9*112-9+1) = a(1)*(10^2016-1)/(10^18-1)

A160678 Numbers n whose abundancy is equal to 13/2; sigma(n)/n = 13/2.

Original entry on oeis.org

170974031122008628879954060917200710847692800, 1893010442758976546037991125738431754692198400, 54361481238923605327597493185154939181072384000
Offset: 1

Author

Gerard P. Michon, Jun 06 2009

Keywords

Comments

This sequence includes many terms but it is conjectured to be finite.

Examples

			a(1) = 2^23 3^9 5^2 7^5 11^5 13^2 17 19^3 31 37 43 61^2 97 181 241.
As the "sum of divisors" function (sigma) is a multiplicative function, sigma(a(1)) is the product of the values of sigma at the above prime powers, respectively given as follows, in factorized form:
sigma(a(1)) = (3^2 5 7 13 17 241) (2^2 11^2 61) (31) (2^3 3 19 43) (2^2 3^2 7 19 37) (3 61) (2 3^2) (2^3 5 181) (2^5) (2 19) (2^2 11) (3 13 97) (2 7 13) (2 7^2) (2 11^2).
a(1) belongs to the sequence because the latter product boils down to 13/2 times the former.
		

Crossrefs

Cf. A000203 (sigma function, sum of divisors), A141643 (abundancy = 5/2), A055153 (abundancy = 7/2), A141645 (abundancy = 9/2), A159271 (abundancy = 11/2), A159907 (half-integral abundancy, "hemiperfect numbers"), A088912 (least numbers of given half-integer abundancy). A007691 (multiperfect numbers, abundancy is an integer), A000396 (perfect numbers, abundancy = 2), A005101 (abundant numbers, abundancy is greater than 2), A005100 (deficient numbers, abundancy is less than 2).

Programs

A162511 Multiplicative function with a(p^e) = (-1)^(e-1).

Original entry on oeis.org

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, 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, -1, 1, 1, -1, 1, 1, 1, 1, 1, -1, 1, -1
Offset: 1

Author

Gerard P. Michon, Jul 05 2009

Keywords

Programs

  • Maple
    A162511 := proc(n)
        local a,f;
        a := 1;
        for f in ifactors(n)[2] do
            a := a*(-1)^(op(2,f)-1) ;
        end do:
        return a;
    end proc: # R. J. Mathar, May 20 2017
  • Mathematica
    a[n_] := (-1)^(PrimeOmega[n] - PrimeNu[n]); Array[a, 100] (* Jean-François Alcover, Apr 24 2017, after Reinhard Zumkeller *)
  • PARI
    a(n)=my(f=factor(n)[,2]); prod(i=1,#f,-(-1)^f[i]) \\ Charles R Greathouse IV, Mar 09 2015
    
  • Python
    from sympy import factorint
    from operator import mul
    def a(n):
        f=factorint(n)
        return 1 if n==1 else reduce(mul, [(-1)**(f[i] - 1) for i in f]) # Indranil Ghosh, May 20 2017
    
  • Python
    from functools import reduce
    from sympy import factorint
    def A162511(n): return -1 if reduce(lambda a,b:~(a^b), factorint(n).values(),0)&1 else 1 # Chai Wah Wu, Jan 01 2023

Formula

Multiplicative function with a(p^e)=(-1)^(e-1) for any prime p and any positive exponent e.
a(n) = 1 when n is a squarefree number (A005117).
From Reinhard Zumkeller, Jul 08 2009 (Start)
a(n) = (-1)^(A001222(n)-A001221(n)).
a(A162644(n)) = +1; a(A162645(n)) = -1. (End)
a(n) = A076479(n) * A008836(n). - R. J. Mathar, Mar 30 2011
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = A307868. - Amiram Eldar, Sep 18 2022
Dirichlet g.f.: Product_{p prime} ((p^s + 2)/(p^s + 1)). - Amiram Eldar, Oct 26 2023

A162510 Dirichlet inverse of A076479.

Original entry on oeis.org

1, 1, 1, 2, 1, 1, 1, 4, 2, 1, 1, 2, 1, 1, 1, 8, 1, 2, 1, 2, 1, 1, 1, 4, 2, 1, 4, 2, 1, 1, 1, 16, 1, 1, 1, 4, 1, 1, 1, 4, 1, 1, 1, 2, 2, 1, 1, 8, 2, 2, 1, 2, 1, 4, 1, 4, 1, 1, 1, 2, 1, 1, 2, 32, 1, 1, 1, 2, 1, 1, 1, 8, 1, 1, 2, 2, 1, 1, 1, 8, 8, 1, 1, 2, 1, 1, 1, 4, 1, 2, 1, 2, 1, 1, 1, 16, 1, 2, 2, 4, 1, 1, 1, 4, 1
Offset: 1

Author

Gerard P. Michon, Jul 05 2009

Keywords

Comments

Apart from signs, this sequence is identical to A162512.

Programs

  • Maple
    A162510 := proc(n)
        local a,f;
        a := 1;
        for f in ifactors(n)[2] do
            a := a*2^(op(2,f)-1) ;
        end do:
        return a;
    end proc: # R. J. Mathar, May 20 2017
  • Mathematica
    a[n_] := 2^(PrimeOmega[n] - PrimeNu[n]); Array[a, 100] (* Jean-François Alcover, Apr 24 2017, after R. J. Mathar *)
  • PARI
    a(n)=my(f=factor(n)[,2]); 2^(vecsum(f)-#f) \\ Charles R Greathouse IV, Nov 02 2016
    
  • Python
    from sympy import factorint
    from operator import mul
    def a(n):
        f=factorint(n)
        return 1 if n==1 else reduce(mul, [2**(f[i] - 1) for i in f]) # Indranil Ghosh, May 20 2017

Formula

Multiplicative with a(p^e) = 2^(e-1) for any prime p and any positive exponent e.
a(n) = n/2 when n is a power of 2 (A000079).
a(n) = 1 when n is a squarefree number (A005117).
a(n) = 2^A046660(n) = A061142(n)/A034444(n). - R. J. Mathar, Nov 02 2016
a(n) = Sum_{d|n} mu(d) * 2^A001222(n/d). - Daniel Suteu, May 21 2020
a(1) = 1; a(n) = -Sum_{d|n, d < n} (-1)^omega(n/d) * a(d). - Ilya Gutkovskiy, Mar 10 2021
Dirichlet g.f.: (1/zeta(s)) * Product_{p prime} (1/(1 - 2/p^s)). - Amiram Eldar, Sep 16 2023
Sum_{k=1..n} 1/a(k) = c * n + o(n), where c = Product_{p prime} (1 - 1/(p*(2*p-1))) = 0.74030830284678515949... (Jakimczuk, 2024, Theorem 2.4, p. 16). - Amiram Eldar, Mar 08 2024
From Vaclav Kotesovec, Mar 08 2024: (Start)
Dirichlet g.f.: zeta(s) * (1 + 1/(2^s*(2^s - 2))) * f(s), where f(s) = Product_{p prime, p>2} (1 + 1/(p^s*(p^s - 2))).
Sum_{k=1..n} a(k) ~ (f(1)*n / (4*log(2))) * (log(n) - 1 + gamma + 5*log(2)/2 + f'(1)/f(1)), where
f(1) = Product_{p prime, p>2} (1 + 1/(p*(p-2))) = A167864 = 1.51478012813749125771853381230067247330485921179389884042843306025133959...,
f'(1) = f(1) * Sum_{p prime, p>2} (-2*log(p)/((p-1)*(p-2))) = -2*f(1)*A347195 = -2.6035805486753944250682818932032862770113061830543948257159113584026980...
and gamma is the Euler-Mascheroni constant A001620. (End)

A162512 Dirichlet inverse of A162511.

Original entry on oeis.org

1, -1, -1, 2, -1, 1, -1, -4, 2, 1, -1, -2, -1, 1, 1, 8, -1, -2, -1, -2, 1, 1, -1, 4, 2, 1, -4, -2, -1, -1, -1, -16, 1, 1, 1, 4, -1, 1, 1, 4, -1, -1, -1, -2, -2, 1, -1, -8, 2, -2, 1, -2, -1, 4, 1, 4, 1, 1, -1, 2, -1, 1, -2, 32, 1, -1, -1, -2, 1, -1, -1, -8, -1, 1, -2, -2, 1, -1, -1, -8, 8, 1
Offset: 1

Author

Gerard P. Michon, Jul 05 2009, Jul 06 2009

Keywords

Comments

The absolute value of this sequence is A162510.
The Moebius function (A008683) can be defined in terms of this sequence: A008683(n) is equal to a(n) if a(n) is odd and zero otherwise.

Programs

  • Maple
    A162512 := proc(n)
        local a,f;
        a := 1;
        for f in ifactors(n)[2] do
            a := -a*(-2)^(op(2,f)-1) ;
        end do:
        return a;
    end proc:
    seq(A162512(n),n=1..100) ; # R. J. Mathar, May 20 2017
  • Mathematica
    b[n_] := (-1)^(PrimeOmega[n] - PrimeNu[n]);
    a[n_] := a[n] = If[n == 1, 1, -Sum[b[n/d] a[d], {d, Most@ Divisors[n]}]];
    Array[a, 100] (* Jean-François Alcover, Feb 17 2020 *)
  • PARI
    a(n) = my(f=factor(n)); for(i=1, #f~, f[i,1]=-(-2)^(f[i,2]-1); f[i,2]=1); factorback(f); \\ Michel Marcus, May 20 2017
    
  • Python
    from sympy import factorint
    from operator import mul
    def a(n):
        f=factorint(n)
        return 1 if n==1 else reduce(mul, [-(-2)**(f[i] - 1) for i in f]) # Indranil Ghosh, May 20 2017
    
  • Scheme
    (define (A162512 n) (if (= 1 n) n (* (- (expt -2 (- (A067029 n) 1))) (A162512 (A028234 n))))) ;; Antti Karttunen, May 20 2017, after the given multiplicative formula.

Formula

Multiplicative function with a(p^e)=-(-2)^(e-1) for any prime p and any positive exponent e.
a(n) = n/2 when n is a power of 4 (A000302).
a(n) = A008683(n) when n is a squarefree number (A005117).
Dirichlet g.f.: Product_{p prime} ((p^s + 1)/(p^s + 2)). - Amiram Eldar, Oct 26 2023

A160112 Number of cubefree integers not exceeding 10^n.

Original entry on oeis.org

1, 9, 85, 833, 8319, 83190, 831910, 8319081, 83190727, 831907372, 8319073719, 83190737244, 831907372522, 8319073725828, 83190737258105, 831907372580692, 8319073725807178, 83190737258070643, 831907372580707771
Offset: 0

Author

Gerard P. Michon, May 02 2009, May 06 2009

Keywords

Comments

An alternate definition specifying "less than 10^n" would yield the same sequence except for the first 3 terms: 0, 8, 84, 833, 8319, etc. (since powers of 10 beyond 1000 are not cubefree anyhow).
The limit of a(n)/10^n is the inverse of Apery's constant, 1/zeta(3), whose digits are given by A088453.

Examples

			a(0)=1 because 1 <= 10^0 is not a multiple of the cube of a prime.
a(1)=9 because the 9 numbers 1,2,3,4,5,6,7,9,10 are cubefree; 8 is not.
a(2)=85 because there are 85 cubefree integers equal to 100 or less.
a(3)=833 because there are 833 cubefree integers below 1000 (which is not cubefree itself).
		

Crossrefs

A004709 (cubefree numbers). A088453 (limit of the string of digits). A160113 (binary counterpart for cubefree integers). A071172 & A053462 (decimal counterpart for squarefree integers). A143658 (binary counterpart for squarefree integers).

Programs

  • Maple
    with(numtheory): A160112:=n->add(mobius(i)*floor(10^n/(i^3)), i=1..10^n): (1,9,85,seq(A160112(n), n=3..5)); # Wesley Ivan Hurt, Aug 01 2015
  • Mathematica
    Table[ Sum[ MoebiusMu[x]*Floor[10^n/(x^3)], {x, 10^(n/3)}], {n, 0, 18}] (* Robert G. Wilson v, May 27 2009 *)
  • Python
    from sympy import mobius, integer_nthroot
    def A160112(n): return sum(mobius(k)*(10**n//k**3) for k in range(1, integer_nthroot(10**n,3)[0]+1)) # Chai Wah Wu, Aug 06 2024
    
  • Python
    from bitarray import bitarray
    from sympy import integer_nthroot
    def A160112(n): # faster program
        q = 10**n
        m = integer_nthroot(q,3)[0]+1
        a, b = bitarray(m), bitarray(m)
        a[1], p, i, c = 1, 2, 4, q-sum(q//k**3 for k in range(2,m))
        while i < m:
            j = 2
            while i < m:
                if j==p:
                    c -= (b[i]^1 if a[i] else -1)*(q//i**3)
                    j, a[i], b[i] = 0, 1, 1
                else:
                    t1, t2 = a[i], b[i]
                    if (t1&t2)^1:
                        a[i], b[i] = (t1^1)&t2, ((t1^1)&t2)^1
                        c += (t2 if t1 else 2)*(q//i**3) if (t1^1)&t2 else (t2-2 if t1 else 0)*(q//i**3)
                i += p
                j += 1
            p += 1
            while a[p]|b[p]:
                p += 1
            i = p<<1
        return c # Chai Wah Wu, Aug 06 2024

Formula

a(n) = Sum_{i=1..floor(10^(n/3))} A008683(i)*floor(10^n/i^3).

A160113 Number of cubefree integers not exceeding 2^n.

Original entry on oeis.org

1, 2, 4, 7, 14, 27, 54, 107, 214, 427, 854, 1706, 3410, 6815, 13629, 27259, 54521, 109042, 218080, 436158, 872318, 1744638, 3489278, 6978546, 13957092, 27914186, 55828364, 111656716, 223313428, 446626866, 893253744, 1786507472, 3573014938, 7146029910, 14292059832
Offset: 0

Author

Gerard P. Michon, May 02 2009

Keywords

Comments

An alternate definition specifying "less than 2^n" would yield the same sequence except for the first 3 terms: 0,1,3,7,14,27,54,107, etc. (since powers of 2 beyond 8 are not cubefree).
The limit of a(n)/2^n is the inverse of Apery's constant, 1/zeta(3) [see A088453].

Examples

			a(0)=1 because there is just one cubefree integer (1) not exceeding 2^0 = 1.
a(3)=7 because 1,2,3,4,5,6,7 are cubefree but 8 is not.
		

Crossrefs

Cf. A004709 (cubefree numbers), A160112 (decimal counterpart for cubefree integers), A143658 (binary counterpart for squarefree integers), A071172 & A053462 (decimal counterpart for squarefree integers).
Cf. A060431.

Programs

  • Haskell
    a160113 = a060431 . (2 ^)  -- Reinhard Zumkeller, Jul 27 2015
    
  • Mathematica
    a[n_] := Sum[ MoebiusMu[i]*Floor[2^n/i^3], {i, 1, 2^(n/3)}]; Table[a[n], {n, 0, 32}] (* Jean-François Alcover, Dec 20 2011, from formula *)
    Module[{nn=20,mu},mu=Table[If[Max[FactorInteger[n][[All,2]]]<3,1,0],{n,2^nn}];Table[Total[Take[mu,2^k]],{k,0,nn}]] (* The program generates the first 20 terms of the sequence. To get more, increase the value (constant) for nn, but the program may take a long time to run. *) (* Harvey P. Dale, Aug 13 2021 *)
  • Python
    from sympy import mobius, integer_nthroot
    def A160113(n): return sum(mobius(k)*((1<Chai Wah Wu, Aug 06 2024
    
  • Python
    from bitarray import bitarray
    from sympy import integer_nthroot
    def A160113(n): # faster program
        q = 1<Chai Wah Wu, Aug 06 2024

Formula

a(n) = Sum_{i=1..2^(n/3)} A008683(i)*floor(2^n/i^3).

A160114 Fluctuations of the number of cubefree integers not exceeding 10^n.

Original entry on oeis.org

0, 1, 2, 1, 0, -1, 3, 7, -10, -1, -7, -14, -59, 21, 34, -15, 103, -104, 302, -38, -514, -290, 1130, 504, 2466, 6813, -1854, 1590, -4879, 3963, -4767, -22709
Offset: 0

Author

Gerard P. Michon, May 06 2009

Keywords

Comments

The asymptotic density of cubefree integers is the reciprocal of Apery's constant 1/zeta(3) = 0.83190737258... The number of cubefree integers not exceeding N is thus roughly N/zeta(3). When N is a power of 10, this sequence gives the difference between the actual number (A160112) and that linear estimate (rounded to the nearest integer).

Crossrefs

A004709 (cubefree integers). A160112 & A160113 (counting cubefree integers).

Formula

a(n) = A160112(n)-round(10^n/zeta(3))

Extensions

a(30)-a(31) from Chai Wah Wu, Aug 08 2024

A160115 Fluctuations of the number of cubefree integers not exceeding 2^n.

Original entry on oeis.org

0, 0, 1, 0, 1, 0, 1, 1, 1, 1, 2, 2, 3, 0, -1, -1, 1, 2, 0, -1, 0, 2, 6, 1, 2, 7, 5, -1, -7, -4, 4, -7, -21, -7, -2, 30, 2, 14, -8, 7, -1, -7, -12, -1, 21, 28, 7, -29, -33, -76, -88, 15, 47, 58, -51, -112, 293, 122, 316, -96, -42, -259, 140, -111, 6, -790, -342, 146, 395, 1087
Offset: 0

Author

Gerard P. Michon, May 06 2009

Keywords

Comments

The asymptotic density of cubefree integers is the reciprocal of Apery's constant 1/zeta(3) = 0.83190737258... The number of cubefree integers not exceeding N is thus roughly N/zeta(3). When N is a power of 2, this sequence gives the difference between the actual number (A160113) and that linear estimate (rounded to the nearest integer).

Crossrefs

A004709 (cubefree integers). A160112 & A160113 (counting cubefree integers).

Formula

a(n) = A160113(n)-round(2^n/zeta(3))

A160679 Square root of n under Nim (or Conway) multiplication.

Original entry on oeis.org

0, 1, 3, 2, 7, 6, 4, 5, 14, 15, 13, 12, 9, 8, 10, 11, 30, 31, 29, 28, 25, 24, 26, 27, 16, 17, 19, 18, 23, 22, 20, 21, 57, 56, 58, 59, 62, 63, 61, 60, 55, 54, 52, 53, 48, 49, 51, 50, 39, 38, 36, 37, 32, 33, 35, 34, 41, 40, 42, 43, 46, 47, 45, 44, 124, 125, 127, 126, 123, 122, 120
Offset: 0

Author

Gerard P. Michon, Jun 25 2009

Keywords

Comments

Because Conway's field On2 (endowed with Nim-multiplication and [bitwise] Nim-addition) has characteristic 2, the Nim-square function (A006042) is an injective field homomorphism (i.e., the square of a sum is the sum of the squares). Thus the square function is a bijection within any finite additive subgroup of On2 (which is a fancy way to say that an integer and its Nim-square have the same bit length). Therefore the Nim square-root function is also a field homomorphism (the square-root of a Nim-sum is the Nim-sum of the square roots) which can be defined as the inverse permutation of A006042 (as such, it preserves bit-length too).

Examples

			a(2) = 3 because TIM(3,3) = 2
More generally, a(x)=y because A006042(y)=x.
		

Crossrefs

Cf. A006042 (Nim-squares). A051917 (Nim-reciprocals), A335162, A212200.

Formula

Letting NIM (= XOR) TIM and RIM denote respectively the sum, product and square root in Conway's Nim-field On2, we see that the bit-length of NIM(x,TIM(x,x)) is less than that of the positive integer x. This remark turns the following relations into an effective recursive definition of a(n) = RIM(n) which uses the fact that RIM is a field homomorphism in On2:
a(0) = 0
a(n) = NIM(n, a(NIM(n, a(n, TIM(n,n)) )
Note: TIM(n,n) = A006042(n)
From Jianing Song, Aug 10 2022: (Start)
For 0 <= n <= 2^2^k-1, a(n) = A335162(n, 2^(2^k-1)). This is because {0,1,...,2^2^k-1} together with the nim operations makes a field isomorphic to GF(2^2^k).
Also for n > 0, a(n) = A335162(n, (A212200(n)+1)/2). (End)