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

A000037 Numbers that are not squares (or, the nonsquares).

Original entry on oeis.org

2, 3, 5, 6, 7, 8, 10, 11, 12, 13, 14, 15, 17, 18, 19, 20, 21, 22, 23, 24, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99
Offset: 1

Views

Author

Keywords

Comments

Note the remarkable formula for the n-th term (see the FORMULA section)!
These are the natural numbers with an even number of divisors. The number of divisors is odd for the complementary sequence, the squares (sequence A000290) and the numbers for which the number of divisors is divisible by 3 is sequence A059269. - Ola Veshta (olaveshta(AT)my-deja.com), Apr 04 2001
a(n) is the largest integer m not equal to n such that n = (floor(n^2/m) + m)/2. - Alexander R. Povolotsky, Feb 10 2008
Union of A007969 and A007970; A007968(a(n)) > 0. - Reinhard Zumkeller, Jun 18 2011
Terms of even numbered rows in the triangle A199332. - Reinhard Zumkeller, Nov 23 2011
If a(n) and a(n+1) are of the same parity then (a(n)+a(n+1))/2 is a square. - Zak Seidov, Aug 13 2012
Theaetetus of Athens proved the irrationality of the square roots of these numbers in the 4th century BC. - Charles R Greathouse IV, Apr 18 2013
4*a(n) are the even members of A079896, the discriminants of indefinite binary quadratic forms. - Wolfdieter Lang, Jun 14 2013

Examples

			For example note that the squares 0, 1, 4, 9, 16 are not included.
		

References

  • Titu Andreescu, Dorin Andrica, and Zuming Feng, 104 Number Theory Problems, Birkhäuser, 2006, 58-60.
  • 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

Cf. A242401 (subsequence).
Cf. A086849 (partial sums), A048395.

Programs

  • Haskell
    a000037 n = n + a000196 (n + a000196 n)
    -- Reinhard Zumkeller, Nov 23 2011
    
  • Magma
    [n : n in [1..1000] | not IsSquare(n) ];
    
  • Magma
    at:=0; for n in [1..10000] do if not IsSquare(n) then at:=at+1; print at, n; end if; end for;
    
  • Maple
    A000037 := n->n+floor(1/2+sqrt(n));
  • Mathematica
    a[n_] := (n + Floor[Sqrt[n + Floor[Sqrt[n]]]]); Table[a[n], {n, 71}] (* Robert G. Wilson v, Sep 24 2004 *)
    With[{upto=100},Complement[Range[upto],Range[Floor[Sqrt[upto]]]^2]] (* Harvey P. Dale, Dec 02 2011 *)
    a[ n_] :=  If[ n < 0, 0, n + Round @ Sqrt @ n]; (* Michael Somos, May 28 2014 *)
  • Maxima
    A000037(n):=n + floor(1/2 + sqrt(n))$ makelist(A000037(n),n,1,50); /* Martin Ettl, Nov 15 2012 */
    
  • PARI
    {a(n) = if( n<0, 0, n + (1 + sqrtint(4*n)) \ 2)};
    
  • Python
    from math import isqrt
    def A000037(n): return n+isqrt(n+isqrt(n)) # Chai Wah Wu, Mar 31 2022
    
  • Python
    from math import isqrt
    def A000037(n): return n+(k:=isqrt(n))+int(n>=k*(k+1)+1) # Chai Wah Wu, Jun 17 2024

Formula

a(n) = n + floor(1/2 + sqrt(n)).
a(n) = n + floor(sqrt( n + floor(sqrt n))).
A010052(a(n)) = 0. - Reinhard Zumkeller, Jan 26 2010
A173517(a(n)) = n; a(n)^2 = A030140(n). - Reinhard Zumkeller, Feb 20 2010
a(n) = A000194(n) + n. - Jaroslav Krizek, Jun 14 2009
a(A002061(n)) = a(n^2-n+1) = A002522(n) = n^2 + 1. - Jaroslav Krizek, Jun 21 2009

Extensions

Edited by Charles R Greathouse IV, Oct 30 2009

A087943 Numbers n such that 3 divides sigma(n).

Original entry on oeis.org

2, 5, 6, 8, 10, 11, 14, 15, 17, 18, 20, 22, 23, 24, 26, 29, 30, 32, 33, 34, 35, 38, 40, 41, 42, 44, 45, 46, 47, 49, 50, 51, 53, 54, 55, 56, 58, 59, 60, 62, 65, 66, 68, 69, 70, 71, 72, 74, 77, 78, 80, 82, 83, 85, 86, 87, 88, 89, 90, 92, 94, 95, 96, 98, 99, 101, 102, 104, 105, 106
Offset: 1

Views

Author

Yuval Dekel (dekelyuval(AT)hotmail.com), Oct 27 2003

Keywords

Comments

Numbers n such that in the prime factorization n = Product_i p_i^e_i, there is some p_i == 1 (mod 3) with e_i == 2 (mod 3) or some p_i == 2 (mod 3) with e_i odd. - Robert Israel, Nov 09 2016

Crossrefs

Programs

  • Maple
    select(n -> numtheory:-sigma(n) mod 3 = 0, [$1..1000]); # Robert Israel, Nov 09 2016
  • Mathematica
    Select[Range[1000],Mod[DivisorSigma[1,#],3]==0&] (* Enrique Pérez Herrero, Sep 03 2013 *)
  • PARI
    is(n)=sigma(n)%3==0 \\ Charles R Greathouse IV, Sep 04 2013
    
  • PARI
    is(n)=forprime(p=2,997,my(e=valuation(n,p)); if(e && Mod(p,3*p-3)^(e+1)==1, return(1), n/=p^e)); sigma(n)%3==0 \\ Charles R Greathouse IV, Sep 04 2013

Formula

a(n) << n^k for any k > 1, where << is the Vinogradov symbol. - Charles R Greathouse IV, Sep 04 2013
a(n) ~ n as n -> infinity: since Sum_{primes p == 2 (mod 3)} 1/p diverges, asymptotically almost every number is divisible by some prime p == 2 (mod 3) but not by p^2. - Robert Israel, Nov 09 2016
Because sigma(n) and sigma(3n)=A144613(n) differ by a multiple of 3, these are also the numbers n such that n divides sigma(3n). - R. J. Mathar, May 19 2020

Extensions

More terms from Benoit Cloitre and Ray Chandler, Oct 27 2003

A353352 Number of divisors d of n for which A048675(d) is a multiple of 3.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Apr 15 2022

Keywords

Comments

a(n) is the number of terms of A332820 that divide n.

Crossrefs

Inverse Möbius transform of A353350.
Cf. also A353332, A353354, A353362.

Programs

  • Mathematica
    f[p_, e_] := e*2^(PrimePi[p] - 1); q[1] = True; q[n_] := Divisible[Plus @@ f @@@ FactorInteger[n], 3]; a[n_] := DivisorSum[n, 1 &, q[#] &]; Array[a, 100] (* Amiram Eldar, Apr 15 2022 *)
  • PARI
    A048675(n) = { my(f = factor(n)); sum(k=1, #f~, f[k, 2]*2^primepi(f[k, 1]))/2; };
    A353350(n) = (0==(A048675(n)%3));
    A353352(n) = sumdiv(n,d,A353350(d));

Formula

a(n) = Sum_{d|n} A353350(d).
a(n) = A000005(n) - A353351(n).
a(p) = 1 for all primes p.
a(n) = a(A003961(n)) = a(A348717(n)), for all n >= 1.
From Peter Munn, Apr 22 2022: (Start)
a(n) = A353328(n) = A353329(n) iff 3|A000005(n) [i.e., A353470(n) = 1].
Otherwise a(n) = A353328(n) iff A048675(n) == 1 (mod 3); a(n) = A353329(n) iff A048675(n) == 2 (mod 3).
(End)

A210826 G.f.: Sum_{n>=1} a(n)*x^n/(1 - x^n) = Sum_{n>=1} x^(n^3).

Original entry on oeis.org

1, -1, -1, 0, -1, 1, -1, 1, 0, 1, -1, 0, -1, 1, 1, -1, -1, 0, -1, 0, 1, 1, -1, -1, 0, 1, 1, 0, -1, -1, -1, 0, 1, 1, 1, 0, -1, 1, 1, -1, -1, -1, -1, 0, 0, 1, -1, 1, 0, 0, 1, 0, -1, -1, 1, -1, 1, 1, -1, 0, -1, 1, 0, 1, 1, -1, -1, 0, 1, -1, -1, 0, -1, 1, 0, 0, 1
Offset: 1

Views

Author

Paul D. Hanna, Mar 27 2012

Keywords

Comments

Compare to Liouville's function lambda (A008836) which satisfies the Lambert series identity: Sum_{n>=1} lambda(n)*x^n/(1-x^n) = Sum_{n>=1} x^(n^2).
This is a multiplicative sequence with Dirichlet g.f. zeta(3s)/zeta(s) and inverse Mobius transform in A010057. - R. J. Mathar, Mar 31 2012

Examples

			G.f.: x/(1-x) - x^2/(1-x^2) - x^3/(1-x^3) - x^5/(1-x^5) + x^6/(1-x^6) - x^7/(1-x^7) + x^8/(1-x^8) + x^10/(1-x^10) - x^11/(1-x^11) + ... + a(n)*x^n/(1-x^n) + ...
= x + x^8 + x^27 + x^64 + x^125 + x^216 + x^343 + ... + x^(n^3) + ...
		

Crossrefs

Cf. A008836, A010057, A059269, A212793 (Dirichlet inverse), A219009.

Programs

  • Maple
    Z := proc(n,k)
        local a,pf,e ;
        a := 1 ;
        for pf in ifactors(n)[2] do
            e := pf[2] ;
            if modp(e,k) = 0 then
                ;
            elif modp(e,k) = 1 then
                a := -a ;
            else
                a := 0 ;
            end if;
        end do;
        a;
    end proc:
    A210826 := proc(n)
        Z(n,3) ;
    end proc: # R. J. Mathar, May 28 2016
  • Mathematica
    Mod[Table[DivisorSigma[0, n], {n, 1, 100}], 3, -1] (* Geoffrey Critzer, Mar 19 2015 *)
  • PARI
    {a(n) = if( n==0, 0, kronecker( -3, numdiv(n)))}; /* Michael Somos, Mar 28 2012 */
    
  • PARI
    {a(n)=[0,1,-1][numdiv(n)%3+1]} /* a(n) == d(n) (mod 3) */
    
  • PARI
    {a(n)=local(CUBES=sum(k=1, floor(n^(1/3)), x^(k^3))); if(n==1, 1, polcoeff(CUBES-sum(m=1, n-1, a(m)*x^m/(1-x^m+x*O(x^n))), n))}
    
  • PARI
    /* Vectorized form (faster): */
    {A=[1]; for(i=1, 256, print1(A[#A], ", "); A=concat(A, 0); A[#A]=polcoeff(sum(k=1, ceil((#A)^(1/3)), x^(k^3)) - sum(m=1, #A-1, A[m]*x^m/(1-x^m+x*O(x^#A))), #A)); print1(A[#A])}
    {sum(n=1, #A, A[n]*x^n/(1-x^n+O(x^(#A))))} /* Verify Lambert series */
    
  • PARI
    for(n=1, 100, print1(direuler(p=2, n, (1-X)/(1-X^3))[n], ", ")) \\ Vaclav Kotesovec, Jun 14 2020
    
  • Python
    from math import prod
    from sympy import factorint
    def A210826(n): return prod((1,-1,0)[e%3] for e in factorint(n).values()) # Chai Wah Wu, Jun 18 2024

Formula

a(n) == d(n) (mod 3), where d(n) is the number of divisors of n;
a(n) = 0 iff the number of divisors of n is divisible by 3 (A059269),
a(n) = 1 iff d(n) == 1 (mod 3),
a(n) = -1 iff d(n) == 2 (mod 3).
Multiplicative with a(p^e) = -1 + ((e+2) mod 3). Thus the Dirichlet g.f. is indeed zeta(3s)/zeta(s). Also sumdiv(n,d,a(d))=1 iff n is a cube, else sumdiv(n,d,a(d))=0 hence Sum_{k=1..n} a(k)*floor(n/k) = floor(n^(1/3)). - Benoit Cloitre, Oct 28 2012

A353355 Numbers k for which A353328(k) is equal to A353329(k).

Original entry on oeis.org

1, 4, 6, 8, 9, 12, 14, 15, 18, 20, 25, 26, 27, 28, 32, 33, 35, 36, 38, 44, 45, 48, 49, 50, 51, 52, 58, 60, 63, 64, 65, 68, 69, 72, 74, 75, 76, 77, 84, 86, 90, 92, 93, 95, 96, 98, 99, 100, 106, 108, 110, 112, 116, 117, 119, 120, 121, 122, 123, 124, 125, 126, 132, 140, 141, 142, 143, 144, 145, 147, 148, 150, 153, 156
Offset: 1

Views

Author

Antti Karttunen and Peter Munn, Apr 15 2022

Keywords

Comments

Numbers k such that A353354(k) [= Sum_{d|k} A332823(d)] is zero.
If k is present, then A003961(k), A348717(k) and (for all m >= 1) k*m^3 are present also.
Includes all numbers whose number of divisors is a multiple of 3 (A059269). Each number in A059269 has its divisors equally distributed between the classes defined by A332823; and they are exactly the numbers, m, for which A353354(m) = A353446(m) = 0.

Crossrefs

Positions of 0's in A353354.
Union of A059269 and A332820.
A353356, A353357 and this sequence partition the natural numbers to three disjoint sets, based on the values obtained by A353354.
Cf. A000578, A001248, A059269 (subsequences).

Programs

  • PARI
    A332823(n) = { my(f = factor(n),u=(sum(k=1, #f~, f[k, 2]*2^primepi(f[k, 1]))/2)%3); if(2==u,-1,u); };
    A353354(n) = sumdiv(n,d,A332823(d));
    isA353355(n) = (0==A353354(n));

A211337 Numbers k for which the number of divisors, tau(k), is congruent to 1 modulo 3.

Original entry on oeis.org

1, 6, 8, 10, 14, 15, 21, 22, 26, 27, 33, 34, 35, 38, 39, 46, 48, 51, 55, 57, 58, 62, 64, 65, 69, 74, 77, 80, 82, 85, 86, 87, 91, 93, 94, 95, 106, 111, 112, 115, 118, 119, 120, 122, 123, 125, 129, 133, 134, 141, 142, 143, 145, 146, 155, 158, 159, 161, 162
Offset: 1

Views

Author

Douglas Latimer, Apr 07 2012

Keywords

Comments

Any term a(n) can be expressed as 1 term from A211484 times 1 nonzero term from A000578. - Douglas Latimer, Apr 20 2012
The numbers of terms not exceeding 10^k, for k = 1, 2, ..., are 4, 36, 366, 3635, 36499, 365456, 3654240, 36538501, 365382167, 3653804173, ... . Conjecture: the asymptotic density of this sequence exists and equals 3*zeta(3)/Pi^2 = 0.3653814847007... (A346602), so, a(n) ~ k*n with k = Pi^2/(3*zeta(3)) = 2.73686555524... . This conjecture is true if this sequence and A211338 have the same density (see A059269). - Amiram Eldar, Jan 06 2024

Examples

			The divisors of 10  are: 1, 2, 5, 10 (4 divisors). 4 is congruent to 1 modulo 3. Thus 10 is a member of this sequence.
		

Crossrefs

This is an extension of A030513 (numbers with 4 divisors).
The union of A059269 and A211338 is the complementary sequence to this one.
The definition of this sequence uses A000005 (the number of divisors of n).

Programs

  • Mathematica
    Select[Range[162], Mod[DivisorSigma[0, #], 3] == 1 &] (* T. D. Noe, Apr 21 2012 *)
  • PARI
    {plnt=1 ; mxind=100 ;for(k=1, 10^6,
    if(numdiv(k) % 3 == 1, print(k); plnt++; if(mxind+1 ==  plnt, break() )))}

Formula

Conjecture: a(n) ~ k*n where k = 2/prod(1 - (p-1)/(p^(3*k))) = 2.7290077... where p ranges over the primes and k ranges over the positive integers. - Charles R Greathouse IV, Apr 13 2012

A211338 Numbers k for which the number of divisors, tau(k), is congruent to 2 modulo 3.

Original entry on oeis.org

2, 3, 5, 7, 11, 13, 16, 17, 19, 23, 24, 29, 30, 31, 37, 40, 41, 42, 43, 47, 53, 54, 56, 59, 61, 66, 67, 70, 71, 73, 78, 79, 81, 83, 88, 89, 97, 101, 102, 103, 104, 105, 107, 109, 110, 113, 114, 127, 128, 130, 131, 135, 136, 137, 138, 139, 149, 151, 152, 154
Offset: 1

Views

Author

Douglas Latimer, Apr 07 2012

Keywords

Comments

The product of any 2 terms a(i)*a(j) is not a member of the sequence.
Any term a(n) can be expressed as 1 term (required to be greater than 1) from A211485 times 1 nonzero term from A000578. - Douglas Latimer, Apr 20 2012
The numbers of terms not exceeding 10^k, for k = 1, 2, ..., are 4, 37, 368, 3681, 36596, 365336, 3653499, 36537962, 365381169, 3653826361, ... . Conjecture: the asymptotic density of this sequence exists and equals 3*zeta(3)/Pi^2 = 0.3653814847007... (A346602), so, a(n) ~ k*n with k = Pi^2/(3*zeta(3)) = 2.73686555524... . This conjecture is true if this sequence and A211337 have the same density (see A059269). - Amiram Eldar, Jan 06 2024

Examples

			The divisors of 16 are: 1, 2, 4, 8, 16 (5 divisors). 5 is congruent to 2 modulo 3. Thus 16 is a member of this sequence.
		

Crossrefs

This is an extension of A000040 (the prime numbers, which each have 2 divisors).
The union of A059269 and A211337 is the complementary sequence to this one.
The definition of this sequence uses A000005 (the number of divisors of n).

Programs

  • Mathematica
    Select[Range[154], Mod[DivisorSigma[0, #], 3] == 2 &] (* T. D. Noe, Apr 21 2012 *)
  • PARI
    {plnt=1 ; mxind=100 ;for(k=1, 10^6,
    if(numdiv(k) % 3 == 2, print(k); plnt++; if(mxind+1 == plnt, break() )))}

Formula

Conjecture: a(n) ~ k*n where k = 2/prod(1 - (p-1)/(p^(3*k))) = 2.7290077... where p ranges over the primes and k ranges over the positive integers. - Charles R Greathouse IV, Apr 13 2012

A336590 Numbers k such that k/A008834(k) is squarefree, where A008834(k) is the largest cube dividing k.

Original entry on oeis.org

1, 2, 3, 5, 6, 7, 8, 10, 11, 13, 14, 15, 16, 17, 19, 21, 22, 23, 24, 26, 27, 29, 30, 31, 33, 34, 35, 37, 38, 39, 40, 41, 42, 43, 46, 47, 48, 51, 53, 54, 55, 56, 57, 58, 59, 61, 62, 64, 65, 66, 67, 69, 70, 71, 73, 74, 77, 78, 79, 80, 81, 82, 83, 85, 86, 87, 88
Offset: 1

Views

Author

Amiram Eldar, Jul 26 2020

Keywords

Comments

Numbers such that none of the exponents in their prime factorization is of the form 3*m + 2.
Cohen (1962) proved that for a given number k >= 2 the asymptotic density of numbers whose exponents in their prime factorization are of the forms k*m or k*m + 1 only is zeta(k)/zeta(2). In this sequence k = 3, and therefore its asymptotic density is zeta(3)/zeta(2) = 6*zeta(3)/Pi^2 = 0.7307629694... (A253905).
Also, numbers k whose number of divisors, A000005(k), is not divisible by 3, i.e., complement of A059269.

Examples

			6 is a term since 6 = 2^1 * 3^1 and 1 is not of the form 3*m + 2.
9 is not a term since 9 = 3^2 and 2 is of the form 3*m + 2.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[100], Max[Mod[FactorInteger[#][[;;,2]], 3]] < 2 &]

A336595 Numbers whose number of divisors is divisible by 5.

Original entry on oeis.org

16, 48, 80, 81, 112, 144, 162, 176, 208, 240, 272, 304, 324, 336, 368, 400, 405, 432, 464, 496, 512, 528, 560, 567, 592, 624, 625, 648, 656, 688, 720, 752, 784, 810, 816, 848, 880, 891, 912, 944, 976, 1008, 1040, 1053, 1072, 1104, 1134, 1136, 1168, 1200, 1232
Offset: 1

Views

Author

Amiram Eldar, Jul 26 2020

Keywords

Comments

The asymptotic density of this sequence is 1 - zeta(5)/zeta(4) = 0.0419426259... (Sathe, 1945).

Examples

			16 is a term since A000005(16) = 5 is divisible by 5.
		

References

  • G. H. Hardy, Ramanujan: twelve lectures on subjects suggested by his life and work, Cambridge, University Press, 1940, p. 63.

Crossrefs

Programs

  • Maple
    q:= n-> is(irem(numtheory[tau](n), 5)=0):
    select(q, [$1..1300])[];  # Alois P. Heinz, Jul 26 2020
  • Mathematica
    Select[Range[1300], Divisible[DivisorSigma[0, #], 5] &]

Formula

A030514 UNION A030628 \ {1} UNION A030633 UNION A030638 UNION A137488 UNION A137493 UNION A175745 UNION A175749 UNION A175752 UNION A175756 UNION ... - R. J. Mathar, May 05 2023

A353446 Let g be the inverse Möbius transform of the Eisenstein integer-valued function f defined in A353445. a(n) is twice the real part of g(n).

Original entry on oeis.org

2, 1, 1, 0, 1, 2, 1, 2, 0, -1, 1, 0, 1, 2, 2, 1, 1, 0, 1, 0, -1, -1, 1, 1, 0, 2, 2, 0, 1, 1, 1, 0, 2, -1, 2, 0, 1, 2, -1, 1, 1, 1, 1, 0, 0, -1, 1, 2, 0, 0, 2, 0, 1, 1, -1, 1, -1, 2, 1, 0, 1, -1, 0, 2, 2, 1, 1, 0, 2, 1, 1, 0, 1, 2, 0, 0, 2, 1, 1, -1, 1, -1, 1, 0, -1, 2, -1, 1, 1, 0, -1, 0, 2, -1, 2, 0, 1, 0, 0, 0, 1
Offset: 1

Views

Author

Antti Karttunen and Peter Munn, Apr 19 2022

Keywords

Comments

The imaginary part of g(n) is A353354(n)*(sqrt(3)/2)*i.
f(n), g(n), and so also a(n), are determined by the cubefree part of n, A050985(n). If the cubefree part is not squarefree, g(n) is 0; otherwise g(n) = x^(A195017(A050985(n))), where x = (1 + sqrt(3)*i)/2, the primitive 6th root of unity with positive imaginary part.
The above formula arises from g being multiplicative (because f is multiplicative). g(prime(m)^k) is 1 for k == 0 (mod 3), 0 for k == 2 (mod 3), and for k == 1 (mod 3) the result depends on the parity of m. g(prime(m)^(3k+1)) is 1+w for odd m, -w for even m, where w is the cube root of unity with positive imaginary part. 1+w and -w are the primitive 6th roots of unity.
So the range of g is the 6 sixth roots of unity and 0 itself: these are the 7 Eisenstein integers closest to 0, and they are clearly closed under multiplication. The range of (a(n)) is [-2..2]. g(n) and a(n) are 0 if and only if the cubefree part of n is not squarefree. (Compare with the Moebius function being 0 when its argument is not squarefree.) Otherwise a(n) is even if and only if n is in A332820.

Crossrefs

Sequences used in a definition of this sequence: A008966, A050985, A090882, A087204, A195017, A353445.
See A353354 for the imaginary part.
Positions of particular values depend on A059269, A211337, A211338, A332820 as shown in the formula section.
Positions of even numbers: A353355.

Programs

  • PARI
    A050985(n) = { my(f=factor(n)); f[, 2] = apply(x->(x % 3), f[, 2]); factorback(f); }; \\ From A050985
    A087204(n) = ([2, 1, -1, -2, -1, 1][1+(n%6)]);
    A195017(n) = { my(f); if(1==n, 0, f=factor(n); sum(i=1, #f~, f[i,2] * (-1)^(1+primepi(f[i,1])))); };
    A353446(n) = { my(u=A050985(n)); issquarefree(u) * A087204(abs(A195017(u))); };

Formula

a(n) = A008966(m) * A087204(A090882(m)) = A008966(m) * A087204(|A195017(m)|), where m = A050985(n), the cubefree part of n, and A008966(.) is the characteristic function of squarefree numbers.
For n >= 1, -2 <= a(n) <= 2.
{n : a(n) = -2} = {A211338} INTERSECT {A332820}.
{n : a(n) = -1} = {A211337} \ {A332820}.
{n : a(n) = 0} = {A059269}.
{n : a(n) = 1} = {A211338} \ {A332820}.
{n : a(n) = 2} = {A211337} INTERSECT {A332820}.
Showing 1-10 of 18 results. Next