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.

Previous Showing 11-20 of 32 results. Next

A340774 Dirichlet g.f.: Sum_{n>0} a(n)/n^s = zeta(s-1) * zeta(2*s-1).

Original entry on oeis.org

1, 2, 3, 6, 5, 6, 7, 12, 12, 10, 11, 18, 13, 14, 15, 28, 17, 24, 19, 30, 21, 22, 23, 36, 30, 26, 36, 42, 29, 30, 31, 56, 33, 34, 35, 72, 37, 38, 39, 60, 41, 42, 43, 66, 60, 46, 47, 84, 56, 60, 51, 78, 53, 72, 55, 84, 57, 58, 59, 90, 61, 62, 84, 120, 65, 66, 67
Offset: 1

Views

Author

Werner Schulte, Jan 20 2021

Keywords

Crossrefs

Sequences of the form n^k * Sum_{d^2|n} 1/d^k for k =
0..10: A046951 (k=0), this sequence (k=1), A351600 (k=2), A351601 (k=3), A351602 (k=4), A351603 (k=5), A351604 (k=6), A351605 (k=7), A351606 (k=8), A351607 (k=9), A351608 (k=10).

Programs

  • Maple
    a:= n-> mul((i[1]^(i[2]+1)-i[1]^iquo(i[2]+1, 2))/(i[1]-1), i=ifactors(n)[2]):
    seq(a(n), n=1..77);  # Alois P. Heinz, Jan 20 2021
  • Mathematica
    f[p_, e_] := (p^(e + 1) - p^Floor[(e + 1)/2])/(p - 1); a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Jan 20 2021 *)
  • PARI
    A340774(n) = { my(f=factor(n)); prod(i=1, #f~, my(p=f[i,1], e=f[i,2]); ((p^(e+1)-(p^((e+1)\2))) / (p-1))); }; \\ Antti Karttunen, Aug 19 2021

Formula

Multiplicative with a(p^e) = (p^(e+1)-p^floor((e+1)/2))/(p-1).
Dirichlet convolution of A000010 and A069290.
Dirichlet convolution with A055615 equals A037213.
G.f.: Sum_{k>=1} k * x^(k^2) / (1 - x^(k^2))^2. - Ilya Gutkovskiy, Aug 19 2021
Sum_{k=1..n} a(k) ~ zeta(3)*n^2/2. - Vaclav Kotesovec, Aug 19 2021
a(n) = n * Sum_{d^2|n} 1/d. - Wesley Ivan Hurt, Feb 14 2022

A227291 Characteristic function of squarefree numbers squared (A062503).

Original entry on oeis.org

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

Views

Author

Ralf Stephan, Jul 05 2013

Keywords

Examples

			a(3) = 0 because 3 is not the square of a squarefree number.
a(4) = 1 because sqrt(4) = 2, a squarefree number.
		

Crossrefs

Programs

  • Haskell
    a227291 n = fromEnum $ (sum $ zipWith (*) mds (reverse mds)) == 1
       where mds = a225817_row n
    -- Reinhard Zumkeller, Jul 30 2013, Jul 07 2013
    
  • Maple
    A227291 := proc(n)
        local pe;
        if n = 0 then
            1;
        else
            for pe in ifactors(n)[2] do
                if op(2,pe) <> 2 then
                    return 0 ;
                end if;
            end do:
        end if;
        1 ;
    end proc:
    seq(A227291(n),n=1..100) ; # R. J. Mathar, Feb 07 2023
  • Mathematica
    Table[Abs[Sum[MoebiusMu[n/d], {d,Select[Divisors[n], SquareFreeQ[#] &]}]], {n, 1, 200}] (* Geoffrey Critzer, Mar 18 2015 *)
    Module[{nn=120,len,sfr},len=Ceiling[Sqrt[nn]];While[!SquareFreeQ[len],len++];sfr=(Select[Range[len],SquareFreeQ])^2; Table[If[MemberQ[ sfr,n],1,0],{n,nn}]] (* Harvey P. Dale, Nov 27 2024 *)
  • PARI
    a(n)=if(n<1, 0, direuler(p=2, n, 1+X^2)[n])
    
  • PARI
    A227291(n) = factorback(apply(e->(2==e), factor(n)[,2])); \\ Antti Karttunen, Jul 14 2022
    
  • PARI
    A227291(n) = (issquare(n) && issquarefree(sqrtint(n))); \\ Antti Karttunen, Jul 14 2022
    
  • Scheme
    (define (A227291 n) (if (= 1 n) n (* (if (= 2 (A067029 n)) 1 0) (A227291 (A028234 n))))) ;; Antti Karttunen, Jul 28 2017

Formula

Dirichlet g.f.: zeta(2s)/zeta(4s) = prod[prime p: 1+p^(-2s) ], see A008966.
a(n) = A008966(A037213(n)), when assumed A008966(0) = 0. - Reinhard Zumkeller, Jul 07 2013
a(n) = A063524(sum(A225817(n,k)*A225817(n,A000005(n)+1-k): k=1..A000005(n))). - Reinhard Zumkeller, Aug 01 2013
Multiplicative with a(p^e) = 1 if e=2, a(p^e) = 0 if e=1 or e>2. - Antti Karttunen, Jul 28 2017
Sum_{k=1..n} a(k) ~ 6*sqrt(n) / Pi^2. - Vaclav Kotesovec, Feb 02 2019
a(n) = A225569(A225546(n)-1). - Peter Munn, Oct 31 2019
From Antti Karttunen, Jul 18 2022: (Start)
a(n) = A010052(n) * A008966(A000196(n)).
a(n) = Sum_{d|n} A008836(n/d) * A307430(d).
a(n) = Sum_{d|n} A007427(n/d) * A322327(d).
(End)

A094048 Let p(n) be the n-th prime congruent to 1 mod 4. Then a(n) = the least m for which m^2+1=p(n)*k^2 has a solution.

Original entry on oeis.org

2, 18, 4, 70, 6, 32, 182, 29718, 1068, 500, 5604, 10, 8890182, 776, 1744, 113582, 4832118, 1118, 1111225770, 1764132, 14, 1710, 23156, 71011068, 16, 82, 8920484118, 1063532, 2482, 126862368, 352618
Offset: 1

Views

Author

Matthijs Coster, Apr 29 2004

Keywords

Comments

Subsequence of A191860. [Reinhard Zumkeller, Jun 18 2011]

Crossrefs

Cf. A002144, A094049 (associated k), A130226, A137351, A179073.

Programs

  • Haskell
    a094048 n = head [m | m <- map (a037213 . subtract 1 . (* a002144 n))
                                   (tail a000290_list), m > 0]
    -- Reinhard Zumkeller, Jun 13 2015
  • Mathematica
    f[n_] := Block[{y = 1}, While[ !IntegerQ[ Sqrt[n*y^2 - 1]], y++ ]; Sqrt[n*y^2 - 1]]; lst = {}; Do[p = Prime@ n; If[ Mod[p, 4] == 1, AppendTo[lst, f@p]; Print[{n, Prime@n, f@p}]], {n, 66}]; lst

Extensions

Edited by Don Reble, Apr 30 2004

A045698 Number of ways n can be written as the sum of two squares of primes.

Original entry on oeis.org

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

Views

Author

Keywords

Comments

a(A214879(n)) = 0; a(A045636(n)) > 0; a(A214723(n)) = 1; a(A214511(n)) = n and a(m) < n for m < A214511(n). - Reinhard Zumkeller, Jul 29 2012
The smallest value of n such that a(n) = 2 is 338. (This helps distinguish it from the characteristic function of A045636.) - Wesley Ivan Hurt, Jun 13 2013

Examples

			For example, a(29) = 1 because 29 = 2^2 + 5^2. a(3) = 0 because there is no way to write 3 as sum of two squares of primes.
		

Crossrefs

Programs

  • Haskell
    a045698 n = length $ filter (\x -> x > 0 && a010051' x == 1) $
    map (a037213 . (n -)) $
    takeWhile (<= div n 2) a001248_list
    -- Reinhard Zumkeller, Jul 29 2012
    
  • PARI
    a(n)=my(s=0,q);forprime(p=2,sqrtint(n\2),if(issquare(n-p^2,&q)&&isprime(q),s++));s \\ Charles R Greathouse IV, Jun 04 2014

Extensions

More terms from Erich Friedman

A060866 Sum of (d+d') over all unordered pairs (d,d') with d*d' = n.

Original entry on oeis.org

2, 3, 4, 9, 6, 12, 8, 15, 16, 18, 12, 28, 14, 24, 24, 35, 18, 39, 20, 42, 32, 36, 24, 60, 36, 42, 40, 56, 30, 72, 32, 63, 48, 54, 48, 97, 38, 60, 56, 90, 42, 96, 44, 84, 78, 72, 48, 124, 64, 93, 72, 98, 54, 120, 72, 120, 80, 90, 60, 168, 62, 96, 104, 135, 84, 144, 68, 126, 96
Offset: 1

Views

Author

Jason Earls, May 04 2001

Keywords

Comments

Paraphrasing the Jovovic formula: if n is not a square then a(n) = sigma(n), the sum of divisors of n, otherwise a(n) = sigma(n) + sqrt(n). - Omar E. Pol, Jun 23 2009
Row sums of A161901. - Omar E. Pol, Jan 06 2014

Examples

			a(4)=9 because pairs of factors are 1*4 and 2*2 and 1+4+2+2=9. a(6)=12 because pairs of factors are 1*6 and 2*3 and 1+6+2+3=12.
		

Crossrefs

Programs

  • Maple
    A060866 := proc(n)
            numtheory[sigma](n) ;
            if issqr(n) then
                    %+sqrt(n) ;
            else
                    % ;
            end if;
    end proc: # R. J. Mathar, Oct 24 2011
  • Mathematica
    Table[Sum[(i^2 + n) (1 - Ceiling[n/i] + Floor[n/i])/i, {i, Floor[Sqrt[n]]}], {n, 100}] (* Wesley Ivan Hurt, Jul 14 2014 *)
    Array[If[IntegerQ@ #2, #3 + #2, #3] & @@ {#, Sqrt@ #, DivisorSigma[1, #]} &, 69] (* Michael De Vlieger, Nov 23 2017 *)
  • PARI
    A037213(n) = if(issquare(n,&n),n,0);
    A060866(n) = (sigma(n)+A037213(n)); \\ Antti Karttunen, Nov 23 2017, after Jan 25 2003 formula of Vladeta Jovovic

Formula

a(n) = A066839(n)+A070038(n) = A000203(n)+A037213(n). G.f.: Sum_{n>0} n*x^n*(x^(n*(n-1))-x^(n^2)+1)/(1-x^n). - Vladeta Jovovic, Jan 25 2003
a(n) = sum_{i=1..floor(sqrt(n))} (n+i^2)*(1-ceiling(n/i)+floor(n/i))/i. - Wesley Ivan Hurt, Jul 14 2014

Extensions

More terms from Erich Friedman, Jun 03 2001

A156678 Consider primitive Pythagorean triangles (A^2 + B^2 = C^2, gcd (A, B) = 1, A < BA020884(n)).

Original entry on oeis.org

4, 12, 24, 15, 40, 60, 35, 84, 112, 63, 144, 180, 21, 99, 220, 264, 143, 312, 364, 45, 195, 420, 480, 255, 56, 544, 612, 77, 323, 684, 80, 760, 399, 840, 924, 117, 483, 1012, 1104, 55, 575, 1200, 140, 1300, 165, 675, 1404, 1512, 783, 176, 1624, 1740, 91, 221, 899
Offset: 1

Views

Author

Ant King, Feb 15 2009

Keywords

Comments

The ordered sequence of A values is A020884(n) and the ordered sequence of B values is A020883(n) (allowing repetitions) and A024354(n) (excluding repetitions)

Examples

			As the first four primitive Pythagorean triples (ordered by increasing A) are (3,4,5), (5,12,13), (7,24,25) and (8,15,17), then a(1)=4, a(2)=12, a(3)=24 and a(4)=15.
		

References

  • Beiler, Albert H.: Recreations In The Theory Of Numbers, Chapter XIV, The Eternal Triangle, Dover Publications Inc., New York, 1964, pp. 104-134.
  • Sierpinski, W.; Pythagorean Triangles, Dover Publications, Inc., Mineola, New York, 2003.

Crossrefs

Programs

  • Haskell
    a156678 n = a156678_list !! (n-1)
    a156678_list = f 1 1 where
       f u v | v > uu `div` 2        = f (u + 1) (u + 2)
             | gcd u v > 1 || w == 0 = f u (v + 2)
             | otherwise             = v : f u (v + 2)
             where uu = u ^ 2; w = a037213 (uu + v ^ 2)
    -- Reinhard Zumkeller, Nov 09 2012
  • Mathematica
    PrimitivePythagoreanTriplets[n_]:=Module[{t={{3,4,5}},i=4,j=5},While[i
    				

Formula

a(n) = A020884(n) + A156680(n).

A156679 Consider primitive Pythagorean triangles (A^2 + B^2 = C^2, gcd (A, B) = 1, A < BA020884(n)).

Original entry on oeis.org

5, 13, 25, 17, 41, 61, 37, 85, 113, 65, 145, 181, 29, 101, 221, 265, 145, 313, 365, 53, 197, 421, 481, 257, 65, 545, 613, 85, 325, 685, 89, 761, 401, 841, 925, 125, 485, 1013, 1105, 73, 577, 1201, 149, 1301, 173, 677, 1405, 1513, 785, 185, 1625, 1741, 109, 229
Offset: 1

Views

Author

Ant King, Feb 15 2009

Keywords

Comments

The ordered sequence of A values is A020884(n) and the ordered sequence of C values is A020882(n) (allowing repetitions) and A008846(n) (excluding repetitions).

Examples

			As the first four primitive Pythagorean triples (ordered by increasing A) are (3,4,5), (5,12,13), (7,24,25) and (8,15,17), then a(1)=5, a(2)=13, a(3)=25 and a(4)=17.
		

References

  • Beiler, Albert H.: Recreations In The Theory Of Numbers, Chapter XIV, The Eternal Triangle, Dover Publications Inc., New York, 1964, pp. 104-134.
  • Sierpinski, W.; Pythagorean Triangles, Dover Publications, Inc., Mineola, New York, 2003.

Crossrefs

Programs

  • Haskell
    a156679 n = a156679_list !! (n-1)
    a156679_list = f 1 1 where
       f u v | v > uu `div` 2        = f (u + 1) (u + 2)
             | gcd u v > 1 || w == 0 = f u (v + 2)
             | otherwise             = w : f u (v + 2)
             where uu = u ^ 2; w = a037213 (uu + v ^ 2)
    -- Reinhard Zumkeller, Nov 09 2012
  • Mathematica
    PrimitivePythagoreanTriplets[n_]:=Module[{t={{3,4,5}},i=4,j=5},While[iHarvey P. Dale, May 10 2020 *)

A208133 Total number of subgroups of rank <= 2 of a certain class of abelian groups of order n defined as direct products of Z/(mZ) X Z/(kZ) with m|k.

Original entry on oeis.org

1, 2, 2, 8, 2, 4, 2, 12, 9, 4, 2, 16, 2, 4, 4, 31, 2, 18, 2, 16, 4, 4, 2, 24, 11, 4, 14, 16, 2, 8, 2, 42, 4, 4, 4, 72, 2, 4, 4, 24, 2, 8, 2, 16, 18, 4, 2, 62, 13, 22, 4, 16, 2, 28, 4, 24, 4, 4, 2, 32, 2, 4, 18, 90, 4, 8, 2, 16, 4, 8, 2, 108, 2, 4, 22, 16
Offset: 1

Views

Author

R. J. Mathar, Mar 29 2012

Keywords

Comments

Level function l_tau^2(n) of Bhowmik and Wu.
Records occur at 1, 2, 4, 8, 12, 16, 32, 36, 64, 72, 108, 128, 144, 288, 432, 576, 1152, 1296, 2304, 3600, 5184, 7200, 9216, 10368, 14112, 14400, 20736, 28224, 28800, 32400, 57600, ... and they are: 1, 2, 8, 12, 16, 31, 42, 72, 90, 108, 112, 116, 279, 378, 434, 810, 1044, 1302, 2025, 3069, 3780, 4158, 4644, 4872, 4914, 8910, 9450, 10530, 11484, 14322, 22275, ... - Antti Karttunen, Mar 21 2018

References

  • A. Laurincikas, The universality of Dirichlet series attached to finite Abelian groups, in "Number Theory", Proc. Turku Sympos. on Number Theory, May 31-June 4, 1999, p 179.

Crossrefs

Programs

  • Maple
    L300828 := [ 1, 0, 0, 1, 0, 0, 0, -2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, -2, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0
    ] ;
    L010052 := [ 1, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ];
    L037213 := [ 1, 0, 0, 2, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ] ;
    Lx := DIRICHLET(L300828,L037213) ;
    Lx := DIRICHLET(Lx,L010052) ;
    Lx := DIRICHLET(Lx,L010052) ;
    Lx := MOBIUSi(Lx) ;
    Lx := MOBIUSi(Lx) ;
    # Name of initial list L1 changed to L300828 to refer to sequence A300828 by Antti Karttunen, Mar 21 2018
  • PARI
    A037213(n) = if(issquare(n),sqrtint(n),0);
    A300828(n) = { if(1==n, return(1)); my(val=1, v=factor(n), d=matsize(v)[1]); for(i=1,d, if(v[i,2] < 2 || v[i,2] > 3, return(0)); if (v[i,2] == 3, val *= -2)); return(val); };
    a208133s1(n) = sumdiv(n,d,A037213(n/d)*A300828(d));
    a208133s2(n) = sumdiv(n,d,issquare(n/d)*a208133s1(d));
    a208133s3(n) = sumdiv(n,d,issquare(n/d)*a208133s2(d));
    a208133s4(n) = sumdiv(n,d,a208133s3(d));
    A208133(n) = sumdiv(n,d,a208133s4(d)); \\ Antti Karttunen, Mar 21 2018, after R. J. Mathar's Maple code
    
  • PARI
    for(n=1, 100, print1(direuler(p=2, n, (1 + X + 2*X^2)/(1 - X)^3/(1 + X)^2/(1 - p*X^2))[n], ", ")) \\ Vaclav Kotesovec, Jun 18 2020

Formula

Dirichlet g.f.: zeta(s)^2*zeta(2s)^2*zeta(2s-1)*Product_{primes p} (1 + 1/p^(2s) - 2/p^(3s)).
Sum_{k=1..n} a(k) ~ c * Pi^4 * log(n)^2 * n / 144, where c = A330594 = Product_{primes p} (1 + 1/p^2 - 2/p^3) = 1.10696011195321767665117913000743959294954883365812241904313404497877733241... - Vaclav Kotesovec, Dec 18 2019
More precise asymptotics: Let f(s) = Product_{primes p} (1 + 1/p^(2*s) - 2/p^(3*s)), then Sum_{k=1..n} a(k) ~ n*Pi^2 * (Pi^2 * f(1) * log(n)^2 + 2*Pi^2 * log(n) * (f(1) * (-1 + 8*gamma - 48*log(A) + 4*log(2*Pi)) + f'(1)) + Pi^2 * (2*f(1)*(1 + 25*gamma^2 + 576*log(A)^2 + log(A) * (48 - 96*log(2*Pi)) - 8*gamma * (1 + 36*log(A) - 3*log(2*Pi)) - 4*log(2*Pi) + 4*log(2*Pi)^2 - 6*sg1) + 2*(-1 + 8*gamma - 48*log(A) + 4*log(2*Pi))*f'(1) + f''(1)) + 48*f(1)*zeta''(2)) / 144, where f(1) = A330594, f'(1) = A330594 * (-A335705) = f(1) * Sum_{primes p} = -2*(p-3) * log(p) / (p^3 + p - 2) = -0.087825458097278818094375273108270679512035928574..., f''(1) = A330594 * (A335705^2 + A335706) = f'(1)^2/f(1) + f(1) * Sum_{primes p} = 2*p*(2*p^3 - 9*p^2 - 1) * log(p)^2) / (p^3 + p - 2)^2 = 0.26722508718782634450711076996710402451611235402675360769..., zeta''(2) = A201994, A is the Glaisher-Kinkelin constant A074962, gamma is the Euler-Mascheroni constant A001620 and sg1 is the first Stieltjes constant (see A082633). - Vaclav Kotesovec, Jun 18 2020

A318462 a(n) = Sum_{d|n, d < n/d} (d XOR n/d) + {square root of n when n is a square}.

Original entry on oeis.org

1, 3, 2, 7, 4, 8, 6, 15, 11, 18, 10, 24, 12, 20, 20, 31, 16, 35, 18, 30, 24, 32, 22, 52, 29, 42, 36, 44, 28, 56, 30, 63, 40, 54, 36, 87, 36, 56, 52, 90, 40, 80, 42, 80, 68, 68, 46, 116, 55, 93, 68, 86, 52, 112, 68, 112, 72, 90, 58, 144, 60, 92, 98, 127, 72, 136, 66, 122, 88, 128, 70, 171, 72, 114, 110, 136, 88, 152, 78
Offset: 1

Views

Author

Antti Karttunen, Aug 28 2018

Keywords

Crossrefs

Programs

  • PARI
    A318462(n) = { my(xors=0); fordiv(n,d, if(d<(n/d), xors += bitxor(d,n/d), if(d==(n/d), xors += d))); (xors); };

Formula

a(n) = A318460(n) + A037213(n) = A000203(n) - 2*A318463(n).

A348608 a(n) = Sum_{d|n, d <= sqrt(n)} (-1)^(d + n/d) * d.

Original entry on oeis.org

1, -1, 1, 1, 1, -3, 1, 1, 4, -3, 1, -2, 1, -3, 4, 5, 1, -6, 1, -3, 4, -3, 1, 2, 6, -3, 4, -3, 1, -11, 1, 5, 4, -3, 6, 0, 1, -3, 4, 0, 1, -12, 1, -3, 9, -3, 1, 8, 8, -8, 4, -3, 1, -12, 6, -2, 4, -3, 1, -5, 1, -3, 11, 13, 6, -12, 1, -3, 4, -15, 1, 0, 1, -3, 9, -3, 8, -12, 1, 8
Offset: 1

Views

Author

Ilya Gutkovskiy, Oct 25 2021

Keywords

Crossrefs

Programs

  • Mathematica
    Table[DivisorSum[n, (-1)^(# + n/#) # &, # <= Sqrt[n] &], {n, 1, 80}]
    nmax = 80; CoefficientList[Series[Sum[k x^(k^2)/(1 + x^k), {k, 1, nmax}], {x, 0, nmax}], x] // Rest
  • PARI
    a(n) = sumdiv(n, d, if (d<=sqrt(n), (-1)^(d + n/d)*d)); \\ Michel Marcus, Oct 25 2021

Formula

G.f.: Sum_{k>=1} k * x^(k^2) / (1 + x^k).
a(n) = 1 if n = 1 or n is an odd prime (A006005) or n = 4 or n = 8. - Bernard Schott, Dec 18 2021
a(n) = A037213(n) - A348953(n). - Ridouane Oudra, Aug 21 2025
Previous Showing 11-20 of 32 results. Next