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 31-40 of 43 results. Next

A327123 Expansion of Sum_{k>=1} phi(k) * x^k / (1 + x^(2*k)), where phi = A000010.

Original entry on oeis.org

1, 1, 1, 2, 5, 1, 5, 4, 5, 5, 9, 2, 13, 5, 5, 8, 17, 5, 17, 10, 5, 9, 21, 4, 25, 13, 13, 10, 29, 5, 29, 16, 9, 17, 25, 10, 37, 17, 13, 20, 41, 5, 41, 18, 25, 21, 45, 8, 37, 25, 17, 26, 53, 13, 45, 20, 17, 29, 57, 10, 61, 29, 25, 32, 65, 9, 65, 34, 21
Offset: 1

Views

Author

Ilya Gutkovskiy, Sep 14 2019

Keywords

Comments

Moebius transform of A050469.

Crossrefs

Programs

  • Mathematica
    nmax = 69; CoefficientList[Series[Sum[EulerPhi[k] x^k/(1 + x^(2 k)), {k, 1, nmax}], {x, 0, nmax}], x] // Rest
    A050469[n_] := DivisorSum[n, # &, MemberQ[{1}, Mod[n/#, 4]] &] - DivisorSum[n, # &, MemberQ[{3}, Mod[n/#, 4]] &]; a[n_] := DivisorSum[n, MoebiusMu[n/#] A050469[#] &]; Table[a[n], {n, 1, 69}]
    f[p_, e_] := If[Mod[p, 4] == 1, p^e, (p^(e+1) - p^e + 2*(-1)^e)/(p+1)]; f[2, e_] := 2^(e-1); a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 70] (* Amiram Eldar, Aug 28 2023 *)
  • PARI
    a(n) = {my(f = factor(n)); prod(i = 1, #f~, p = f[i,1]; e = f[i,2]; if(p == 2, 2^(e-1), if(p%4 == 1, p^e, (p^(e+1) - p^e + 2*(-1)^e)/(p+1)))); } \\ Amiram Eldar, Aug 28 2023

Formula

a(n) = Sum_{d|n} mu(n/d) * A050469(d).
From Amiram Eldar, Aug 28 2023: (Start)
Multiplicative with a(2^e) = 2^(e-1), and if p is an odd prime a(p^e) = 1 if p == 1 (mod 4) and (p^(e+1) - p^e + 2*(-1)^e)/(p+1) otherwise.
Sum_{k=1..n} a(k) ~ c * n^2, where c = 3*G/Pi^2 = 0.278420154533..., and G is Catalan's constant (A006752). (End)
Conjecture: a(n) = Sum_{k=1..n} sin(GCD(k,n) * Pi/2). - Velin Yanev and Vaclav Kotesovec, Jun 01 2024

A337140 Numbers m = a + b with a and b positive integers whose product a*b = k^2 is a square.

Original entry on oeis.org

2, 4, 5, 6, 8, 10, 12, 13, 14, 15, 16, 17, 18, 20, 22, 24, 25, 26, 28, 29, 30, 32, 34, 35, 36, 37, 38, 39, 40, 41, 42, 44, 45, 46, 48, 50, 51, 52, 53, 54, 55, 56, 58, 60, 61, 62, 64, 65, 66, 68, 70, 72, 73, 74, 75, 76, 78, 80, 82, 84, 85, 86, 87, 88, 89, 90, 91
Offset: 1

Views

Author

Hein van Winkel, Aug 18 2020

Keywords

Comments

Related to Heron triangles with a partition point on one of the sides. Calculations become quite different when the partition a + b = m gives the perfect square k^2 = a*b.
These numbers coincide with the numbers > 1 not in A004614.
Let m = 2^t * p_1^a_1 * p_2^a_2 * ... * p_r^a_r * q_1^b_1 * q_2^b_2 * ... * q_s^b_s with t >= 0, a_i >= 0 for i=1..r, where p_i == 1 (mod 4) for i=1..r and q_j == -1 (mod 4) for j=1..s.
Even numbers (A005843) belong to this sequence: m = 2*k and p = k^2.
Numbers divisible by a prime q congruent to 1 (mod 4) (cf. A004613) belong to this sequence: m = q * m_1 = (u^2 + v^2) * m_1 and p = (u*v*q)^2.
The other numbers are divisible only by primes congruent to 3 (mod 4) (cf. A004614).
If a term m is not in the union of A005843 and A004613, then m = q_1^b_1 * q_2^b_2 * ... * q_s^b_s is a term of A018825 (numbers not the sum of two nonzero squares) = q_i * m_1 = q_i *(u^2 + v) and p = q_i^2 * u^2 * v for all u^2 < m_1 and v nonsquare. And so m is not a term: A contradiction.

Examples

			Even numbers m = 2*k give a = b = k. For example, 94 = 47+47 and k^2 = 47^2.
Numbers which are divisible by a prime q congruent to 1 (mod 4) give m = q*m' = (u^2 + v^2)*m' and p = (u*v*m')^2. For example, 87 = 3*29 = 3*(25 + 4) = (5*4*3)^2 = 60^2.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[100], Length @ Select[Times @@@ IntegerPartitions[#, {2}], IntegerQ @ Sqrt[#1] &] > 0 &] (* Amiram Eldar, Aug 26 2020 *)
  • PARI
    upto(n) = { my(res = List(vector(n\2, i, 2*i))); forstep(i = 1, n, 2, c = core(i); for(k = 1, sqrtint((n-i)\c), listput(res, i + c*k^2); ) ); listsort(res, 1); res } \\ David A. Corneth, Aug 26 2020
    
  • PARI
    is(n) = for(i = 1, n\2 + 1, if(issquare(i * (n-i)), return(n>1))); 0 \\ David A. Corneth, Aug 26 2020
    
  • Python
    from itertools import count, islice
    from sympy import primefactors
    def A337140_gen(startvalue=2): # generator of terms >= startvalue
        return filter(lambda n: n&1^1 or not all(p&2 for p in primefactors(n>>(~n & n-1).bit_length())), count(max(startvalue,2)))
    A337140_list = list(islice(A337140_gen(),30)) # Chai Wah Wu, Aug 21 2024

A337156 Numbers k such that the k-th triangular number has all its prime factors congruent to 1 mod 4.

Original entry on oeis.org

1, 25, 73, 145, 169, 193, 289, 313, 337, 409, 457, 481, 577, 625, 673, 697, 745, 793, 841, 865, 985, 1009, 1129, 1153, 1201, 1249, 1321, 1345, 1369, 1417, 1465, 1489, 1513, 1537, 1585, 1657, 1681, 1753, 1801, 1873, 1993, 2017, 2041, 2137, 2257, 2305, 2329, 2377, 2425, 2473
Offset: 1

Views

Author

Frank M Jackson, Nov 21 2020

Keywords

Comments

The k-th triangular number t_k is given as t_k = k(k+1)/2. The t_k associated with this sequence form the intersection of A004613 and A000217.
Apart from 1, numbers whose prime factors are all congruent to 1 mod 4 are also known as primitive hypotenuse numbers because they are candidates for the hypotenuse of primitive right triangles.
For t_k to be a primitive hypotenuse number all its divisors must be congruent to 1 mod 4. Therefore k has to be odd and congruent to 1 mod 8.

Examples

			a(2) = 25 because the 25th triangular number is 325, the prime factorization of 325 is 5^2*13, and 5,13 are both congruent to 1 mod 4. It is the second such occurrence.
		

Crossrefs

Programs

  • Mathematica
    lst={}; Do[p=1+8n;If[Union@Mod[First/@FactorInteger[p(p+1)/2], 4]=={1}, AppendTo[lst, p]], {n, 0, 10^3}]; lst
    Select[Range[2500],Union[Mod[FactorInteger[(#(#+1))/2][[;;,1]],4]]=={1}&] (* Harvey P. Dale, Aug 07 2025 *)
  • PARI
    isok(k) = my(f=factor(k*(k+1)/2)[,1]~); #select(x->((x%4)==1), f) == #f; \\ Michel Marcus, Nov 22 2020

A354379 Hypotenuses of Pythagorean triangles whose legs are also hypotenuse numbers (A009003).

Original entry on oeis.org

25, 50, 65, 75, 85, 89, 100, 109, 125, 130, 145, 149, 150, 169, 170, 173, 175, 178, 185, 195, 200, 205, 218, 221, 225, 229, 233, 250, 255, 260, 265, 267, 275, 289, 290, 293, 298, 300, 305, 313, 325, 327, 338, 340, 346, 349, 350, 353, 356, 365, 370, 375, 377, 390, 400
Offset: 1

Views

Author

Lamine Ngom, May 24 2022

Keywords

Comments

If m is in sequence, so is any multiple of m. Primitive elements (terms which are not divisible by any previous term) are A354381.

Examples

			25 is in sequence since each member of the Pythagorean triple (15, 20, 25) belongs to A009003.
The Pythagorean triple (39, 80, 89) has all its terms in A009003. Hence 89 is in sequence.
		

Crossrefs

Programs

  • Maple
    ishyp:= proc(n) local s; ormap(s -> s mod 4 = 1, numtheory:-factorset(n)) end proc:
    filter:= proc(n) local s;
      ormap(s -> ishyp(subs(s,x)) and ishyp(subs(s,y)), [isolve(x^2+y^2=n^2)])
    end proc:
    select(filter, [$1..1000]); # Robert Israel, Jan 10 2023
  • Mathematica
    ishyp[n_] := AnyTrue[FactorInteger[n][[All, 1]], Mod[#, 4] == 1&];
    filter[n_] := AnyTrue[Solve[x^2 + y^2 == n^2, Integers], ishyp[x /. #] && ishyp[y /. #]&];
    Select[Range[400], filter] (* Jean-François Alcover, May 11 2023, after Robert Israel *)

A354381 Primitive elements in A354379, being those not divisible by any previous term.

Original entry on oeis.org

25, 65, 85, 89, 109, 145, 149, 169, 173, 185, 205, 221, 229, 233, 265, 289, 293, 305, 313, 349, 353, 365, 377, 409, 421, 433, 449, 461, 481, 485, 493, 505, 509, 533, 565, 601, 613, 629, 641, 653, 677, 685, 689, 697, 709, 757, 761, 769, 773, 785, 793, 797, 821, 829, 841, 857, 877, 881, 901, 905
Offset: 1

Views

Author

Lamine Ngom, May 24 2022

Keywords

Examples

			The primitive Pythagorean triple (39, 80, 89) has all its terms in A009003, and 89 is not divisible by any previous term. Hence 89 is in sequence.
		

Crossrefs

Programs

  • Maple
    ishyp:= proc(n) local s; ormap(s -> s mod 4 = 1, numtheory:-factorset(n)) end proc:
    filter:= proc(n) local s;
      ormap(s -> ishyp(subs(s,x)) and ishyp(subs(s,y)), [isolve(x^2+y^2=n^2)])
    end proc:
    R:= []: count:= 0:
    for n from 1 while count < 100 do
      if ormap(t -> n mod t = 0, R) then next fi;
      if filter(n) then R:= [op(R),n]; count:= count+1; fi
    od:
    R; # Robert Israel, Jan 10 2023
  • Mathematica
    ishyp[n_] := AnyTrue[ FactorInteger[n][[All, 1]], Mod[#, 4] == 1 &] ;
    filter[n_] := AnyTrue[Solve[x^2 + y^2 == n^2, Integers], ishyp[x /. #] && ishyp[y /. #] &];
    R = {}; count = 0;
    For[n = 1, count < 100, n++, If[AllTrue[R, Mod[n, #] != 0&], If[filter[n], AppendTo[R, n]; count++]]];
    R (* Jean-François Alcover, May 11 2023, after Robert Israel *)

Extensions

Corrected by Robert Israel, Jan 10 2023

A065129 a(n) is the least m such that m/A003285(m) = n, or 0 if no such m exists.

Original entry on oeis.org

0, 2, 6, 8, 5, 12, 28, 32, 18, 10, 0, 24, 0, 0, 30, 0, 17, 0, 38, 40, 42, 0, 276, 48, 125, 26, 0, 56, 406, 0, 496, 128, 66, 68, 140, 72, 37, 0, 0, 80, 0, 84, 0, 176, 90, 0, 1222, 192, 294, 50, 102, 104, 636, 432, 110, 0, 0, 928, 708, 120, 0, 248, 252, 0, 65, 132
Offset: 1

Views

Author

Naohiro Nomoto, Nov 14 2001

Keywords

Comments

Conjecture: A003285(m) = even or A004613, if m is divisible by A003285(m). [This sentence appears to be saying that all odd terms of this sequence are in A004613.]
Because A003285(m) < 3.76*sqrt(m)*log(m) (see Stanton et al.), it is enough to check m such that m <= (3.76*n*log(m))^2. For n <= 36 it even suffices to check m <= 5916*n. - Nathaniel Johnston, May 10 2011

Crossrefs

Programs

  • Maple
    with(numtheory): A065129 := proc(n) local m: if(n=1)then return 0:fi: for m from n by n to 5916*n do if(frac(sqrt(m))<>0)then if(n*nops(cfrac(sqrt(m),'periodic','quotients')[2])=m)then return m: fi: fi: od: return 0: end: seq(A065129(n),n=1..10); # Nathaniel Johnston, May 10 2011
  • Mathematica
    Do[k = 2; While[ k / Length[ Last[ ContinuedFraction[ Sqrt[k]]]] != n, k++ ]; Print[k], {n, 2, 10} ]

Extensions

a(11)-a(37) from Nathaniel Johnston, May 10 2011
Terms a(38) and beyond from Chai Wah Wu, Jan 27 2021

A260872 Squarefree numbers k such that k+1 has no primes of the form 4*m-1 and at most one 2 in its prime factorization.

Original entry on oeis.org

1, 33, 57, 73, 105, 129, 145, 177, 193, 201, 217, 249, 273, 313, 337, 345, 385, 393, 409, 457, 465, 481, 537, 553, 561, 577, 609, 633, 649, 673, 697, 705, 745, 753, 777, 793, 817, 849, 865, 889, 897, 913, 921, 969, 985, 1009, 1041, 1065, 1081, 1113, 1129
Offset: 1

Views

Author

J. Lowell, Aug 01 2015

Keywords

Comments

An even number k is congruent to either 0 or 2 mod 4. If congruent to 0, it is divisible by 4 and thus not squarefree. If k is congruent to 2, k+1 will be one less than a multiple of 4, and thus at least one prime factor of k+1 will be one less than a multiple of 4. Thus, there are no even numbers in this sequence.
From the author's comment above, all sequence terms must be odd, so k+1 must always be even and k+1 will always be singly even. - Ray Chandler, Aug 03 2015

Examples

			41 + 1 = 42 = 2*3*7 and both 3 and 7 are prime numbers of the form 4*n-1, so 41 is not a term of this sequence.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[1100],SquareFreeQ[#]&&IntegerExponent[#+1,2]<2&&Select[First/@FactorInteger[#+1],Mod[#,4]==3&]=={}&] (* Ray Chandler, Aug 02 2015 *)

A330890 Decimal expansion of Product_{prime p == 1 (mod 4)} (1 + 1/p^2)/(1 - 1/p^2).

Original entry on oeis.org

1, 1, 1, 3, 6, 8, 0, 6, 1, 8, 1, 3, 2, 3, 1, 6, 4, 8, 8, 8, 6, 1, 8, 9, 1, 9, 4, 1, 1, 9, 8, 3, 1, 9, 9, 1, 3, 6, 5, 6, 5, 8, 2, 7, 5, 4, 7, 8, 7, 7, 5, 9, 2, 3, 2, 4, 4, 5, 6, 1, 1, 5, 1, 6, 3, 4, 6, 7, 5, 6, 7, 2, 7, 7, 2, 5, 4, 6, 6, 5, 1, 0, 7, 5, 0, 3, 6, 6, 2, 7, 6, 5, 2, 7, 7, 4, 1, 8, 1, 5, 8, 8, 1, 7, 2
Offset: 1

Views

Author

Vaclav Kotesovec, Apr 30 2020

Keywords

Examples

			1.1136806181323164888618919411983199136565827547877592324456...
		

Crossrefs

Programs

  • Mathematica
    RealDigits[12*Catalan/Pi^2, 10, 120][[1]]
  • PARI
    12*Catalan/Pi^2 \\ Michel Marcus, May 01 2020

Formula

Equals 12*G/Pi^2, where G is Catalan's constant (A006752).
Equals A243380 / A088539.
Equals Sum_{q in A004613} 2^A001221(q)/q^2. - R. J. Mathar, Jan 27 2021
Equals (1 + w)/(1 - w), where w = tanh(Sum_{prime p == 1 (mod 4)} arctanh(1/p^2)) = 0.0537832523783875... Physical interpretation: the constant w is the relativistic sum of the velocities c/p^2 over all Pythagorean primes p, in units where the speed of light c = 1. - Thomas Ordowski, Nov 14 2024

Extensions

Name edited by Thomas Ordowski, Nov 15 2024

A375361 Odd numbers with at least two prime divisors of the form 4*k + 1 counted with multiplicity.

Original entry on oeis.org

25, 65, 75, 85, 125, 145, 169, 175, 185, 195, 205, 221, 225, 255, 265, 275, 289, 305, 325, 365, 375, 377, 425, 435, 445, 455, 475, 481, 485, 493, 505, 507, 525, 533, 545, 555, 565, 575, 585, 595, 615, 625, 629, 663, 675, 685, 689, 697, 715, 725, 745, 765, 775
Offset: 1

Views

Author

Arkadiusz Wesolowski, Aug 13 2024

Keywords

Comments

Odd numbers k such that k^2 can be expressed as the arithmetic mean of two distinct perfect squares in more than one way. For example, 25^2 = (5^2 + 35^2)/2 = (17^2 + 31^2)/2.
Let x be a squared integer which is the central element of a 3 X 3 magic square in which seven (or more) of the entries are squared integers. If the greatest common divisor of all nine entries is 1, then the square root of x is a composite number that is divisible only by primes congruent to 1 mod 4. For example, sqrt(A221669(5)) = 425 is both in A004613 and in this sequence.

Examples

			65 is in this sequence because 65 has two prime factors of the form 4*k + 1, namely 5 = 4*1 + 1 and 13 = 4*3 + 1.
		

Crossrefs

Programs

  • Magma
    f:=func; nopf:=func; sum:=func; [n: n in [1..775 by 2] | sum(n) gt 1];
    
  • PARI
    isok(n) = my(v=Vec(factor(n))); n%2&&sum(t=1, omega(n), if((v[1]%4)[t]==1, v[2][t]))>1;
    
  • PARI
    isok(n) = my(t); if(n%2, for(k=sqrtint(n^2-1)+2, sqrtint(2*n^2-1), if(issquare(2*n^2-k^2)&&t++>1, return(1)))); 0;

A162597 Ordered hypotenuses of primitive Pythagorean triangles, A008846, which are not hypotenuses of non-primitive Pythagorean triangles with any shorter legs.

Original entry on oeis.org

5, 13, 17, 25, 29, 37, 41, 53, 61, 65, 73, 85, 89, 97, 101, 109, 113, 137, 145, 149, 157, 173, 181, 185, 193, 197, 221, 229, 233, 241, 257, 265, 269, 277, 281, 293, 313, 317, 325, 337, 349, 353, 365, 373, 377, 389, 397, 401, 409, 421, 433, 445, 449, 457, 461
Offset: 1

Views

Author

Keywords

Comments

Hypotenuses of primitive Pythagorean triangles are shown in A008846 and A020882, and may also be hypotenuses of non-primitive Pythagorean triangles (see A009177, A118882). The sequence contains those hypotenuses of A008846 where in the set of Pythagorean triangles with this hypotenuse the one with the shortest leg is a primitive one.
This ordering first on hypotenuses, then filtering on the shortest legs, and then selecting the primitive triangles removes 125, 169, 205, 289, 305, 425, etc. from A008846.

Examples

			The hypotenuse 25 appears in the triangle 25^2 = 7^2 + 24^2 (primitive) and in the triangle 25^2 = 15^2 + 20^2 (non-primitive). The triangle with the shortest leg (here: 7) is primitive, so 25 is in the sequence.
The hypotenuse 125 appears in the triangles 125^2 = 35^2 + 120^2 (non-primitive), 125^2 = 44^2 + 117^2 (primitive), 125^2 = 75^2 + 100^2 (non-primitive). The case with the shortest leg (here: 35) of these 3 is not primitive, so 125 is not in the sequence.
		

Crossrefs

Programs

  • Mathematica
    f[n_]:=Module[{k=1},While[(n-k^2)^(1/2)!=IntegerPart[(n-k^2)^(1/2)],k++; If[2*k^2>=n,k=0;Break[]]];k]; lst1={};Do[If[f[n^2]>0,a=f[n^2];b=(n^2-a^2)^(1/ 2);If[GCD[n,a,b]==1,AppendTo[lst1,n]]],{n,3,6!}];lst1

Extensions

Definition clarified by R. J. Mathar, Aug 14 2009
Previous Showing 31-40 of 43 results. Next