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

A097756 Table read by rows of A054994 ordered by A046080.

Original entry on oeis.org

1, 5, 25, 125, 65, 625, 3125, 15625, 325, 78125, 390625, 1953125, 1625, 9765625, 48828125, 4225, 244140625, 1105, 8125, 1220703125, 6103515625, 30517578125, 40625, 152587890625, 21125, 762939453125, 3814697265625, 203125
Offset: 1

Views

Author

Ray Chandler, Aug 26 2004

Keywords

Comments

Row n of table is A054994(k) such that A046080(A054994(k)) = n; number of terms in row n is A001055(2n+1).
Column 1 of table gives A006339 (or A046112).

Examples

			Table begins:
0: 1,
1: 5,
2: 25,
3: 125,
4: 65,625,
5: 3125,
6: 15625,
7: 325,78125,
8: 390625,
9: 1953125,
10: 1625,9765625,
11: 48828125,
12: 4225,244140625,
13: 1105,8125,1220703125,
14: 6103515625,
15: 30517578125,
16: 40625,152587890625,
17: 21125,762939453125,
18: 3814697265625,
19: 203125,19073486328125,
20: 95367431640625,
...
		

Crossrefs

A083025 Number of primes congruent to 1 modulo 4 dividing n (with multiplicity).

Original entry on oeis.org

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

Views

Author

Reinhard Zumkeller, Oct 29 2001

Keywords

References

  • David A. Cox, "Primes of the Form x^2 + n y^2", Wiley, 1989, p. 61.

Crossrefs

First differs from A046080 at n=65.
Cf. A001222, A007814, A027746, A065339 (== 3 (mod 4)), A378879 (=2,3 (mod 4)), A005089 (without multiplicity).

Programs

  • Haskell
    a083025 1 = 0
    a083025 n = length [x | x <- a027746_row n, mod x 4 == 1]
    -- Reinhard Zumkeller, Jan 10 2012
    
  • Maple
    A083025 := proc(n)
        a := 0 ;
        for f in ifactors(n)[2] do
            if op(1,f) mod 4 = 1 then
                a := a+op(2,f) ;
            end if;
        end do:
        a ;
    end proc: # R. J. Mathar, Dec 16 2011
  • Mathematica
    f[n_]:=Plus@@Last/@Select[If[n==1,{},FactorInteger[n]],Mod[#[[1]],4]==1&]; Table[f[n],{n,100}] (* Ray Chandler, Dec 18 2011 *)
  • PARI
    A083025(n)=sum(i=1,#n=factor(n)~,if(n[1,i]%4==1,n[2,i]))  \\ M. F. Hasler, Apr 16 2012

Formula

a(n) = A001222(n) - A007814(n) - A065339(n).
Totally additive with a(2) = 0, a(p) = 1 if p == 1 (mod 4), and a(p) = 0 if p == 3 (mod 4). - Amiram Eldar, Jun 17 2024

A084645 Hypotenuses for which there exists a unique integer-sided right triangle.

Original entry on oeis.org

5, 10, 13, 15, 17, 20, 26, 29, 30, 34, 35, 37, 39, 40, 41, 45, 51, 52, 53, 55, 58, 60, 61, 68, 70, 73, 74, 78, 80, 82, 87, 89, 90, 91, 95, 97, 101, 102, 104, 105, 106, 109, 110, 111, 113, 115, 116, 117, 119, 120, 122, 123, 135, 136, 137, 140, 143, 146, 148, 149
Offset: 1

Views

Author

Eric W. Weisstein, Jun 01 2003

Keywords

Comments

Numbers whose square is uniquely decomposable into the sum of two nonzero squares: these are those numbers with exactly one prime divisor of the form 4k+1 with multiplicity one. - Jean-Christophe Hervé, Nov 11 2013

Crossrefs

Cf. A004144 (0), A084646 (2), A084647 (3), A084648 (4), A084649 (5), A097219 (6), A097101 (7), A290499 (8), A290500 (9), A097225 (10), A290501 (11), A097226 (12), A097102 (13), A290502 (14), A290503 (15), A097238 (16), A097239 (17), A290504 (18), A290505 (19), A097103 (22), A097244 (31), A097245 (37), A097282 (40), A097626 (67).

Programs

  • Mathematica
    r[a_] := {b, c} /. {ToRules[ Reduce[0 < b < c && a^2 == b^2 + c^2, {b, c}, Integers]]}; Select[ Range[150], Length[r[#]] == 1 &] (* Jean-François Alcover, Oct 22 2012 *)
  • PARI
    is_a084645(n) = #qfbsolve(Qfb(1,0,1),n^2,3)==3 \\ Hugo Pfoertner, Sep 28 2024

Formula

Terms are obtained by the products A004144(k)*A002144(p) for k, p > 0, ordered by increasing values. - Jean-Christophe Hervé, Nov 12 2013
A046080(a(n)) = 1, A046109(a(n)) = 12. - Jean-Christophe Hervé, Dec 01 2013

A046079 Number of Pythagorean triangles with leg n.

Original entry on oeis.org

0, 0, 1, 1, 1, 1, 1, 2, 2, 1, 1, 4, 1, 1, 4, 3, 1, 2, 1, 4, 4, 1, 1, 7, 2, 1, 3, 4, 1, 4, 1, 4, 4, 1, 4, 7, 1, 1, 4, 7, 1, 4, 1, 4, 7, 1, 1, 10, 2, 2, 4, 4, 1, 3, 4, 7, 4, 1, 1, 13, 1, 1, 7, 5, 4, 4, 1, 4, 4, 4, 1, 12, 1, 1, 7, 4, 4, 4, 1, 10, 4, 1, 1, 13, 4, 1, 4, 7, 1, 7, 4, 4, 4, 1, 4, 13, 1, 2, 7
Offset: 1

Views

Author

Keywords

Comments

Number of ways in which n can be the leg (other than the hypotenuse) of a primitive or nonprimitive right triangle.
Number of ways that 2/n can be written as a sum of exactly two distinct unit fractions. For every solution to 2/n = 1/x + 1/y, x < y, the Pythagorean triple is (n, y-x, x+y-n). - T. D. Noe, Sep 11 2002
For n>2, the positions of the ones in this sequence correspond to the prime numbers and their doubles, A001751. - Ant King, Jan 29 2011
Let L = length of longest leg, H = hypotenuse. For odd n: L =(n^2-1)/2 and H = L+1. For even n, L = (n^2-4)/4 and H = L+2. - Richard R. Forberg, May 31 2013
Or number of ways n^2 can be written as the difference of two positive squares: a(3) = 1: 3^2 = 5^2-4^2; a(8) = 2: 8^2 = 10^2-6^2 = 17^2-15^2; a(16) = 3: 16^2 = 20^2-12^2 = 34^2-30^2 = 65^2-63^2. - Alois P. Heinz, Aug 06 2019
Number of ways to write 2n as the sum of two positive integers r and s such that r < s and (s - r) | (s * r). - Wesley Ivan Hurt, Apr 21 2020

References

  • Albert H. Beiler, Recreations in the Theory of Numbers. New York: Dover Publications, 1966, pp. 116-117.

Crossrefs

Programs

  • Mathematica
    a[n_] := (DivisorSigma[0, If[OddQ[n], n, n / 2]^2] - 1) / 2; Table[a[i], {i, 100}] (* Amber Hu (hupo001(AT)gmail.com), Jan 23 2008 *)
    a[ n_] := Length @ FindInstance[ n > 0 && y > 0 && z > 0 && n^2 + y^2 == z^2, {y, z}, Integers, 10^9]; (* Michael Somos, Jul 25 2018 *)
  • PARI
    A046079(n) = ((numdiv(if(n%2, n, n/2)^2)-1)/2); \\ Antti Karttunen, Sep 27 2018
    
  • Python
    from math import prod
    from sympy import factorint
    def A046079(n): return prod((e+(p&1)<<1)-1 for p,e in factorint(n).items())>>1 # Chai Wah Wu, Sep 06 2022
  • Sage
    def A046079(n) : return (number_of_divisors(n^2 if n%2==1 else n^2/4) - 1) // 2 # Eric M. Schmidt, Jan 26 2013
    

Formula

For odd n, a(n) = A018892(n) - 1.
Let n = (2^a0)*(p1^a1)*...*(pk^ak). Then a(n) = [(2*a0 - 1)*(2*a1 + 1)*(2*a2 + 1)*(2*a3 + 1)*...*(2*ak + 1) - 1]/2. Note that if there is no a0 term, i.e., if n is odd, then the first term is simply omitted. - Temple Keller (temple.keller(AT)gmail.com), Jan 05 2008
For odd n, a(n) = (tau(n^2) - 1) / 2; for even n, a(n) = (tau((n / 2)^2) - 1) / 2. - Amber Hu (hupo001(AT)gmail.com), Jan 23 2008
a(n) = Sum_{i=1..n-1} (1 - ceiling(i*(2*n-i)/(2*n-2*i)) + floor(i*(2*n-i)/(2*n-2*i))). - Wesley Ivan Hurt, Apr 21 2020
Sum_{k=1..n} a(k) ~ (n / Pi^2) * (log(n)^2 + c_1 * log(n) + c_2), where c_1 = 2 * (gamma - 1) + 48*log(A) - 4*log(Pi) - 13*log(2)/3 = 3.512088... (gamma = A001620, log(A) = A225746), and c_2 = 6 * gamma^2 - (6 + log(2)) * gamma + 2 - Pi^2/2 + 19*log(2)^2/18 + log(2)/3 - 6*gamma_1 + 8 * (zeta'(2)/zeta(2))^2 + (4 - 12*gamma + 2*log(2)/3) * zeta'(2)/zeta(2) - 4*zeta''(2)/zeta(2) = -4.457877... (gamma_1 = -A082633). - Amiram Eldar, Nov 08 2024

A046109 Number of lattice points (x,y) on the circumference of a circle of radius n with center at (0,0).

Original entry on oeis.org

1, 4, 4, 4, 4, 12, 4, 4, 4, 4, 12, 4, 4, 12, 4, 12, 4, 12, 4, 4, 12, 4, 4, 4, 4, 20, 12, 4, 4, 12, 12, 4, 4, 4, 12, 12, 4, 12, 4, 12, 12, 12, 4, 4, 4, 12, 4, 4, 4, 4, 20, 12, 12, 12, 4, 12, 4, 4, 12, 4, 12, 12, 4, 4, 4, 36, 4, 4, 12, 4, 12, 4, 4, 12, 12, 20, 4, 4, 12, 4, 12, 4, 12, 4, 4, 36
Offset: 0

Views

Author

Keywords

Comments

Also number of Gaussian integers x + yi having absolute value n. - Alonso del Arte, Feb 11 2012
The indices of terms not equaling 4 or 12 correspond to A009177, n>0. - Bill McEachen, Aug 14 2025

Examples

			a(5) = 12 because the circumference of the circle with radius 5 will pass through the twelve points (5, 0), (4, 3), (3, 4), (0, 5), (-3, 4), (-4, 3), (-5, 0), (-4, -3), (-3, -4), (0, -5), (3, -4) and (4, -3). Alternatively, we can say the twelve Gaussian integers 5, 4 + 3i, ... , 4 - 3i all have absolute value of 5.
		

Crossrefs

Programs

  • Haskell
    a046109 n = length [(x,y) | x <- [-n..n], y <- [-n..n], x^2 + y^2 == n^2]
    -- Reinhard Zumkeller, Jan 23 2012
    
  • Maple
    N:= 1000: # to get a(0) to a(N)
    A:= Array(0..N):
    A[0]:= 1:
    for x from 1 to N do
      A[x]:= A[x]+4;
      for y from 1 to min(x-1,floor(sqrt(N^2-x^2))) do
         z:= x^2+y^2;
         if issqr(z) then
           t:= sqrt(z);
           A[t]:= A[t]+8;
         fi
      od
    od:
    seq(A[i],i=0..N); # Robert Israel, May 08 2015
  • Mathematica
    Table[Length[Select[Flatten[Table[r + I i, {r, -n, n}, {i, -n, n}]], Abs[#] == n &]], {n, 0, 49}] (* Alonso del Arte, Feb 11 2012 *)
  • PARI
    a(n)=if(n==0, return(1)); my(f=factor(n)); 4*prod(i=1,#f~, if(f[i,1]%4==1, 2*f[i,2]+1, 1)) \\ Charles R Greathouse IV, Feb 01 2017
    
  • PARI
    a(n)=if(n==0, return(1)); t=0; for(x=1, n-1, y=n^2-x^2; if(issquare(y), t++)); return(4*t+4) \\ Arkadiusz Wesolowski, Nov 14 2017
  • Python
    from sympy import factorint
    def a(n):
        r = 1
        for p, e in factorint(n).items():
            if p%4 == 1: r *= 2*e + 1
        return 4*r if n > 0 else 0
    # Orson R. L. Peters, Jan 31 2017
    

Formula

a(n) = A000328(n) - A051132(n).
a(n) = 8*A046080(n) + 4 for n > 0.
a(n) = A004018(n^2).
From Jean-Christophe Hervé, Dec 01 2013: (Start)
a(A084647(k)) = 28.
a(A084648(k)) = 36.
a(A084649(k)) = 44. (End)
a(n) = 4 * Product_{i=1..k} (2*e_i + 1) for n > 0, given that p_i^e_i is the i-th factor of n with p_i = 1 mod 4. - Orson R. L. Peters, Jan 31 2017
a(n) = [x^(n^2)] theta_3(x)^2, where theta_3() is the Jacobi theta function. - Ilya Gutkovskiy, Apr 20 2018
From Hugo Pfoertner, Sep 21 2023: (Start)
a(n) = 8*A063014(n) - 4 for n > 0.
a(n) = 4*A256452(n) for n > 0. (End)

A084647 Hypotenuses for which there exist exactly 3 distinct integer triangles.

Original entry on oeis.org

125, 250, 375, 500, 750, 875, 1000, 1125, 1375, 1500, 1750, 2000, 2197, 2250, 2375, 2625, 2750, 2875, 3000, 3375, 3500, 3875, 4000, 4125, 4394, 4500, 4750, 4913, 5250, 5375, 5500, 5750, 5875, 6000, 6125, 6591, 6750, 7000, 7125, 7375, 7750
Offset: 1

Views

Author

Eric W. Weisstein, Jun 01 2003

Keywords

Comments

Numbers whose square is decomposable in 3 different ways into the sum of two nonzero squares: these are those with exactly one prime divisor of the form 4k+1 with multiplicity three. - Jean-Christophe Hervé, Nov 11 2013

Examples

			a(1) = 125 = 5^3, and 125^2 = 100^2 + 75^2 = 117^2 + 44^2 = 120^2 + 35^2. - _Jean-Christophe Hervé_, Nov 11 2013
		

Crossrefs

Cf. A004144 (0), A084645 (1), A084646 (2), A084648 (4), A084649 (5), A097219 (6), A097101 (7), A290499 (8), A290500 (9), A097225 (10), A290501 (11), A097226 (12), A097102 (13), A290502 (14), A290503 (15), A097238 (16), A097239 (17), A290504 (18), A290505 (19), A097103 (22), A097244 (31), A097245 (37), A097282 (40), A097626 (67).

Programs

  • Mathematica
    Clear[lst,f,n,i,k] f[n_]:=Module[{i=0,k=0},Do[If[Sqrt[n^2-i^2]==IntegerPart[Sqrt[n^2-i^2]],k++ ],{i,n-1,1,-1}]; k/2]; lst={}; Do[If[f[n]==3,AppendTo[lst,n]],{n,4*5!}]; lst (* Vladimir Joseph Stephan Orlovsky, Aug 12 2009 *)

Formula

Terms are obtained by the products A004144(k)*A002144(p)^3 for k, p > 0, ordered by increasing values. - Jean-Christophe Hervé, Nov 12 2013

A084648 Hypotenuses for which there exist exactly 4 distinct integer triangles.

Original entry on oeis.org

65, 85, 130, 145, 170, 185, 195, 205, 221, 255, 260, 265, 290, 305, 340, 365, 370, 377, 390, 410, 435, 442, 445, 455, 481, 485, 493, 505, 510, 520, 530, 533, 545, 555, 565, 580, 585, 595, 610, 615, 625, 629, 663, 680, 685, 689, 697, 715, 730, 740, 745
Offset: 1

Views

Author

Eric W. Weisstein, Jun 01 2003

Keywords

Comments

Numbers whose square is decomposable in 4 different ways into the sum of two nonzero squares: these are those with exactly 2 distinct prime divisors of the form 4k+1, each with multiplicity one, or with only one prime divisor of this form with multiplicity 4. - Jean-Christophe Hervé, Nov 11 2013
If m is a term, then 2*m and p*m are terms where p is any prime of the form 4k+3. - Ray Chandler, Dec 30 2019

Examples

			a(1) = 65 = 5*13, and 65^2 = 52^2 + 39^2 = 56^2 + 33^2 = 60^2 + 25^2 = 63^2 + 16^2. - _Jean-Christophe Hervé_, Nov 11 2013
		

Crossrefs

Cf. A004144 (0), A084645 (1), A084646 (2), A084647 (3), A084649 (5), A097219 (6), A097101 (7), A290499 (8), A290500 (9), A097225 (10), A290501 (11), A097226 (12), A097102 (13), A290502 (14), A290503 (15), A097238 (16), A097239 (17), A290504 (18), A290505 (19), A097103 (22), A097244 (31), A097245 (37), A097282 (40), A097626 (67).

Programs

  • Mathematica
    Clear[lst,f,n,i,k] f[n_]:=Module[{i=0,k=0},Do[If[Sqrt[n^2-i^2]==IntegerPart[Sqrt[n^2-i^2]],k++ ],{i,n-1,1,-1}]; k/2]; lst={}; Do[If[f[n]==4,AppendTo[lst,n]],{n,6!}]; lst (* Vladimir Joseph Stephan Orlovsky, Aug 12 2009 *)

A084649 Hypotenuses for which there exist exactly 5 distinct Pythagorean triangles.

Original entry on oeis.org

3125, 6250, 9375, 12500, 18750, 21875, 25000, 28125, 34375, 37500, 43750, 50000, 56250, 59375, 65625, 68750, 71875, 75000, 84375, 87500, 96875, 100000, 103125, 112500, 118750, 131250, 134375, 137500, 143750, 146875, 150000, 153125
Offset: 1

Views

Author

Eric W. Weisstein, Jun 01 2003

Keywords

Comments

Numbers whose square is decomposable in 5 different ways into the sum of two nonzero squares: these are those with exactly one prime divisor of the form 4k+1 with multiplicity 5. - Jean-Christophe Hervé, Nov 12 2013

Examples

			a(1) = 5^5, a(5) = 6*5^5, a(65) = 13^5. - _Jean-Christophe Hervé_, Nov 12 2013
		

Crossrefs

Cf. A004144 (0), A084645 (1), A084646 (2), A084647 (3), A084648 (4), A097219 (6), A097101 (7), A290499 (8), A290500 (9), A097225 (10), A290501 (11), A097226 (12), A097102 (13), A290502 (14), A290503 (15), A097238 (16), A097239 (17), A290504 (18), A290505 (19), A097103 (22), A097244 (31), A097245 (37), A097282 (40), A097626 (67).

Programs

  • Mathematica
    Clear[lst,f,n,i,k] f[n_]:=Module[{i=0,k=0},Do[If[Sqrt[n^2-i^2]==IntegerPart[Sqrt[n^2-i^2]],k++ ],{i,n-1,1,-1}]; k/2]; lst={}; Do[If[f[n]==5,AppendTo[lst,n]],{n,3*6!}]; lst (* Vladimir Joseph Stephan Orlovsky, Aug 12 2009 *)

Formula

Terms are obtained by the products A004144(k)*A002144(p)^5 for k, p > 0 ordered by increasing values. - Jean-Christophe Hervé, Nov 12 2013

A084646 Hypotenuses for which there exist exactly 2 distinct integer triangles.

Original entry on oeis.org

25, 50, 75, 100, 150, 169, 175, 200, 225, 275, 289, 300, 338, 350, 400, 450, 475, 507, 525, 550, 575, 578, 600, 675, 676, 700, 775, 800, 825, 841, 867, 900, 950, 1014, 1050, 1075, 1100, 1150, 1156, 1175, 1183, 1200, 1225, 1350, 1352, 1369, 1400
Offset: 1

Views

Author

Eric W. Weisstein, Jun 01 2003

Keywords

Comments

Numbers whose square is decomposable in 2 different ways into the sum of two nonzero squares: these are those with exactly one prime divisor of the form 4k+1 with multiplicity two. - Jean-Christophe Hervé, Nov 11 2013

Crossrefs

Cf. A004144 (0), A084645 (1), A084647 (3), A084648 (4), A084649 (5), A097219 (6), A097101 (7), A290499 (8), A290500 (9), A097225 (10), A290501 (11), A097226 (12), A097102 (13), A290502 (14), A290503 (15), A097238 (16), A097239 (17), A290504 (18), A290505 (19), A097103 (22), A097244 (31), A097245 (37), A097282 (40), A097626 (67).

Programs

  • Mathematica
    Clear[lst,f,n,i,k] f[n_]:=Module[{i=0,k=0},Do[If[Sqrt[n^2-i^2]==IntegerPart[Sqrt[n^2-i^2]],k++ ],{i,n-1,1,-1}]; k/2]; lst={}; Do[If[f[n]==2,AppendTo[lst,n]],{n,4*5!}]; lst (* Vladimir Joseph Stephan Orlovsky, Aug 12 2009 *)

Formula

Terms are obtained by the products A004144(k)*A002144(p)^2 for k, p > 0, ordered by increasing values. - Jean-Christophe Hervé, Nov 12 2013
A046080(a(n)) = 2, A046109(a(n)) = 20. - Jean-Christophe Hervé, Dec 01 2013

A046081 Number of integer-sided right triangles with n as a hypotenuse or leg.

Original entry on oeis.org

0, 0, 1, 1, 2, 1, 1, 2, 2, 2, 1, 4, 2, 1, 5, 3, 2, 2, 1, 5, 4, 1, 1, 7, 4, 2, 3, 4, 2, 5, 1, 4, 4, 2, 5, 7, 2, 1, 5, 8, 2, 4, 1, 4, 8, 1, 1, 10, 2, 4, 5, 5, 2, 3, 5, 7, 4, 2, 1, 14, 2, 1, 7, 5, 8, 4, 1, 5, 4, 5, 1, 12, 2, 2, 9, 4, 4, 5, 1, 11, 4, 2, 1, 13, 8, 1, 5, 7, 2, 8, 5, 4, 4, 1, 5, 13, 2, 2, 7
Offset: 1

Views

Author

Keywords

Comments

Pythagorean triples including primitive ones and non-primitive ones. For a certain n, it may be a leg or the hypotenuse in either a primitive Pythagorean triple, or a non-primitive Pythagorean triple, or both. - Rui Lin, Nov 02 2019

Examples

			From _Rui Lin_, Nov 02 2019: (Start)
n=25 is the least number which meets all of following cases:
1. 25 is a leg of a primitive Pythagorean triple (25,312,313), so A024361(25)=1;
2. 25 is the hypotenuse of a primitive Pythagorean triple (7,24,25), so A024362(25)=1;
3. 25 is a leg of a non-primitive Pythagorean triple (25,60,65), so A328708(25)=1;
4. 25 is the hypotenuse of a non-primitive Pythagorean triple (15,20,25), so A328712(25)=1;
5. Combination 1. and 3. means A046079(25)=2;
6. Combination 2. and 4. means A046080(25)=2;
7. Combination 1. and 2. means A024363(25)=2;
8. Combination 3. and 4. means A328949(25)=2;
9. Combination of 1., 2., 3., and 4. means A046081(25)=4. (End)
		

References

  • A. Beiler, Recreations in the Theory of Numbers. New York: Dover, pp. 116-117, 1966.

Crossrefs

Programs

  • Mathematica
    a[1] = 0; a[n_] := Module[{f}, f = Select[FactorInteger[n], Mod[#[[1]], 4] == 1&][[All, 2]]; (DivisorSigma[0, If[OddQ[n], n, n/2]^2]-1)/2 + (Times @@ (2*f+1) - 1)/2]; Array[a, 99] (* Jean-François Alcover, Jul 19 2017 *)
  • PARI
    a(n) = {oddn = n/(2^valuation(n, 2)); f = factor(oddn); for (k=1, #f~, if ((f[k,1] % 4) != 1, f[k,2] = 0);); n1 = factorback(f); if (n % 2, (numdiv(n^2)+numdiv(n1^2))/2 -1, (numdiv((n/2)^2)+numdiv(n1^2))/2 -1);} \\ Michel Marcus, Mar 07 2016
    
  • Python
    from sympy import factorint
    def a(n):
        p1, p2 = 1, 1
        for i in factorint(n).items():
            if i[0] % 4 == 1:
                p2 *= i[1] * 2 + 1
            p1 *= i[1] * 2 + 1 - (2 if i[0] == 2 else 0)
        return (p1 + p2)//2 - 1
    print([a(n) for n in range(1, 100)])  # Oleg Sorokin, Mar 02 2023

Formula

a(n) = A046079(n) + A046080(n). - Lekraj Beedassy, Dec 01 2003
From Rui Lin, Nov 02 2019: (Start)
a(n) = A024363(n) + A328949(n).
a(n) = A024361(n) + A024362(n) + A328708(n) + A328712(n). (End)

Extensions

Improved name by Bernard Schott, Jan 03 2019
Showing 1-10 of 55 results. Next