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

A004144 Nonhypotenuse numbers (indices of positive squares that are not the sums of 2 distinct nonzero squares).

Original entry on oeis.org

1, 2, 3, 4, 6, 7, 8, 9, 11, 12, 14, 16, 18, 19, 21, 22, 23, 24, 27, 28, 31, 32, 33, 36, 38, 42, 43, 44, 46, 47, 48, 49, 54, 56, 57, 59, 62, 63, 64, 66, 67, 69, 71, 72, 76, 77, 79, 81, 83, 84, 86, 88, 92, 93, 94, 96, 98, 99, 103, 107, 108, 112, 114, 118, 121, 124, 126, 127
Offset: 1

Views

Author

Keywords

Comments

Also numbers with no prime factors of form 4*k+1.
m is a term iff A072438(m) = m.
Density 0. - Charles R Greathouse IV, Apr 16 2012
Closed under multiplication. Primitive elements are A045326, 2 and the primes of form 4*k+3. - Jean-Christophe Hervé, Nov 17 2013

References

  • Steven R. Finch, Mathematical Constants, Cambridge, 2003, pp. 98-104.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Complement of A009003.
The subsequence of primes is A045326.

Programs

  • Haskell
    import Data.List (elemIndices)
    a004144 n = a004144_list !! (n-1)
    a004144_list = map (+ 1) $ elemIndices 0 a005089_list
    -- Reinhard Zumkeller, Jan 07 2013
  • Mathematica
    fQ[n_] := If[n > 1, First@ Union@ Mod[ First@# & /@ FactorInteger@ n, 4] != 1, True]; Select[ Range@ 127, fQ]
    A004144 = Select[Range[127],Length@Reduce[s^2 + t^2 == s # && s > t > 0, Integers] == 0 &] (* Gerry Martens, Jun 09 2020 *)
  • PARI
    is(n)=n==1||vecmin(factor(n)[,1]%4)>1 \\ Charles R Greathouse IV, Apr 16 2012
    
  • PARI
    list(lim)=my(v=List(),u=vectorsmall(lim\=1)); forprimestep(p=5,lim,4, forstep(n=p,lim,p, u[n]=1)); for(i=1,lim, if(u[i]==0, listput(v,i))); u=0; Vec(v) \\ Charles R Greathouse IV, Jan 13 2022
    

Formula

A005089(a(n)) = 0. - Reinhard Zumkeller, Jan 07 2013
The number of terms below x is ~ (A * x / sqrt(log(x))) * (1 + C/log(x) + O(1/log(x)^2)), where A = A244659 and C = A244662 (Shanks, 1975). - Amiram Eldar, Jan 29 2022

Extensions

More terms from Reinhard Zumkeller, Jun 17 2002
Name clarified by Evan M. Bailey, Sep 17 2019

A001842 Expansion of Sum_{n>=0} x^(4*n+3)/(1 - x^(4*n+3)).

Original entry on oeis.org

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

Views

Author

Keywords

Comments

Number of divisors of n of the form 4*k+3. - Reinhard Zumkeller, Apr 18 2006

References

  • G. H. Hardy, Ramanujan: twelve lectures on subjects suggested by his life and work, Cambridge, University Press, 1940, p. 132.
  • James J. Tattersall, Elementary Number Theory in Nine Chapters, Cambridge University Press, 1999, page 244.

Crossrefs

Programs

  • Maple
    with(numtheory): seq(add(binomial(d,3) mod 2, d in divisors(n)), n=0..100); # Ridouane Oudra, Nov 19 2019
  • Mathematica
    Join[{0}, Table[d = Divisors[n]; Length[Select[d, Mod[#, 4] == 3 &]], {n, 100}]] (* T. D. Noe, Aug 10 2012 *)
    a[n_] := DivisorSum[n, 1 &, Mod[#, 4] == 3 &]; a[0] = 0; Array[a, 100, 0] (* Amiram Eldar, Nov 25 2023 *)
  • PARI
    a(n) = if(n<1, 0, sumdiv(n, d, d%4 == 3)); \\ Amiram Eldar, Nov 25 2023

Formula

a(A072437(n)) = 0. - Benoit Cloitre, Apr 24 2003
a(n) = A001227(n) - A001826(n). - Reinhard Zumkeller, Apr 18 2006
G.f.: Sum_{k>=1} x^(3*k)/(1 - x^(4*k)). - Ilya Gutkovskiy, Sep 11 2019
a(n) = Sum_{d|n} (binomial(d,3) mod 2). - Ridouane Oudra, Nov 19 2019
Sum_{k=1..n} a(k) = n*log(n)/4 + c*n + O(n^(1/3)*log(n)), where c = gamma(3,4) - (1 - gamma)/4 = A256846 - (1 - A001620)/4 = -0.180804... (Smith and Subbarao, 1981). - Amiram Eldar, Nov 25 2023

A097706 Part of n composed of prime factors of form 4k+3.

Original entry on oeis.org

1, 1, 3, 1, 1, 3, 7, 1, 9, 1, 11, 3, 1, 7, 3, 1, 1, 9, 19, 1, 21, 11, 23, 3, 1, 1, 27, 7, 1, 3, 31, 1, 33, 1, 7, 9, 1, 19, 3, 1, 1, 21, 43, 11, 9, 23, 47, 3, 49, 1, 3, 1, 1, 27, 11, 7, 57, 1, 59, 3, 1, 31, 63, 1, 1, 33, 67, 1, 69, 7, 71, 9, 1, 1, 3, 19, 77, 3, 79, 1, 81, 1, 83, 21
Offset: 1

Views

Author

Ralf Stephan, Aug 30 2004

Keywords

Comments

Largest term of A004614 that divides n. - Peter Munn, Apr 15 2021

Crossrefs

Equivalent sequence for distinct prime factors: A170819.
Equivalent sequences for prime factors of other forms: A000265 (2k+1), A170818 (4k+1), A072436 (not 4k+3), A248909 (6k+1), A343431 (6k+5).
Range of values: A004614.
Positions of 1's: A072437.

Programs

  • Maple
    a:= n-> mul(`if`(irem(i[1], 4)=3, i[1]^i[2], 1), i=ifactors(n)[2]):
    seq(a(n), n=1..100);  # Alois P. Heinz, Jun 09 2014
  • Mathematica
    a[n_] := Product[{p, e} = pe; If[Mod[p, 4] == 3, p^e, 1], {pe, FactorInteger[n]}]; Array[a, 100] (* Jean-François Alcover, Jun 16 2015, updated May 29 2019 *)
  • PARI
    a(n)=local(f); f=factor(n); prod(k=1, matsize(f)[1], if(f[k, 1]%4<>3, 1, f[k, 1]^f[k, 2]))
    
  • Python
    from sympy import factorint
    from operator import mul
    def a072436(n):
        f=factorint(n)
        return 1 if n == 1 else reduce(mul, [1 if i%4==3 else i**f[i] for i in f])
    def a(n): return n/a072436(n) # Indranil Ghosh, May 08 2017
    
  • Python
    from math import prod
    from sympy import factorint
    def A097706(n): return prod(p**e for p, e in factorint(n).items() if p & 3 == 3) # Chai Wah Wu, Jun 28 2022

Formula

a(n) = n/A072436(n).
a(A004614(n)) = A004614(n).
a(A072437(n)) = 1.
a(n) = A000265(n)/A170818(n). - Peter Munn, Apr 15 2021

A005091 Number of distinct primes = 3 mod 4 dividing n.

Original entry on oeis.org

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

Views

Author

Keywords

Crossrefs

Programs

  • Haskell
    a005091 = sum . map a079261 . a027748_row
    -- Reinhard Zumkeller, Jan 07 2013
    
  • Magma
    [0] cat [#[p:p in PrimeDivisors(n)| p mod 4 eq 3]: n in [2..100]]; // Marius A. Burtea, Nov 19 2019
    
  • Magma
    [0] cat [&+[Binomial(p,3) mod 2:p in PrimeDivisors(n)]:n in [2..100]]; // Marius A. Burtea, Nov 19 2019
    
  • Maple
    with(numtheory): seq(add(binomial(p,3) mod 2, p in factorset(n)), n=1..100); # Ridouane Oudra, Nov 19 2019
  • Mathematica
    f[n_]:=Length@Select[If[n==1,{},FactorInteger[n]],Mod[#[[1]],4]==3&]; Table[f[n],{n,102}] (* Ray Chandler, Dec 18 2011 *)
  • PARI
    for(n=1,100,print1(sumdiv(n,d,isprime(d)*if((d-3)%4,0,1)),","))
    
  • Python
    from sympy import primefactors
    def A005091(n): return sum(1 for p in primefactors(n) if p&3==3) # Chai Wah Wu, Jul 07 2024

Formula

Additive with a(p^e) = 1 if p = 3 (mod 4), 0 otherwise.
From Reinhard Zumkeller, Jan 07 2013: (Start)
a(n) = Sum_{k=1..A001221(n)} A079261(A027748(n,k)).
a(A072437(n)) = 0.
a(A187811(n)) > 0. (End)
a(n) = Sum_{p|n} (binomial(p,3) mod 2), where p is a prime. - Ridouane Oudra, Nov 19 2019

A050466 a(n) = Sum_{d|n, n/d=3 mod 4} d^3.

Original entry on oeis.org

0, 0, 1, 0, 0, 8, 1, 0, 27, 0, 1, 64, 0, 8, 126, 0, 0, 216, 1, 0, 370, 8, 1, 512, 0, 0, 730, 64, 0, 1008, 1, 0, 1358, 0, 126, 1728, 0, 8, 2198, 0, 0, 2960, 1, 64, 3402, 8, 1, 4096, 343, 0, 4914, 0, 0, 5840, 126, 512, 6886, 0, 1, 8064, 0, 8, 9991, 0
Offset: 1

Views

Author

N. J. A. Sloane, Dec 23 1999

Keywords

Comments

From Robert G. Wilson v, Mar 26 2015: (Start)
a(n) = 0 for n = 1, 2, 4, 5, 8, 10, 13, 16, 17, 20, 25, ... (A072437).
a(n) = 1 for n = 3, 7, 11, 19, 23, 31, 43, 47, 59, 67, ... (A002145). (End)

Crossrefs

Programs

  • Mathematica
    a[n_] := Total[(n/Select[Divisors@ n, Mod[#, 4] == 3 &])^3]; Array[a, 64] (* Robert G. Wilson v, Mar 26 2015 *)
    a[n_] := DivisorSum[n, #^3 &, Mod[n/#, 4] == 3 &]; Array[a, 50] (* Amiram Eldar, Nov 05 2023 *)
  • PARI
    a(n) = sumdiv(n, d, ((n/d % 4)== 3)* d^3); \\ Michel Marcus, Mar 26 2015

Formula

From Amiram Eldar, Nov 05 2023: (Start)
a(n) = A007331(n) - A050462(n).
a(n) = A050462(n) - A050471(n).
a(n) = (A007331(n) - A050471(n))/2.
Sum_{k=1..n} a(k) ~ c * n^4 / 4, where c = Pi^4/192 - A175572/2 = 0.0128667399315... . (End)

Extensions

Offset changed from 0 to 1 by Robert G. Wilson v, Mar 27 2015

A072436 Remove prime factors of form 4*k+3.

Original entry on oeis.org

1, 2, 1, 4, 5, 2, 1, 8, 1, 10, 1, 4, 13, 2, 5, 16, 17, 2, 1, 20, 1, 2, 1, 8, 25, 26, 1, 4, 29, 10, 1, 32, 1, 34, 5, 4, 37, 2, 13, 40, 41, 2, 1, 4, 5, 2, 1, 16, 1, 50, 17, 52, 53, 2, 5, 8, 1, 58, 1, 20, 61, 2, 1, 64, 65, 2, 1, 68, 1, 10, 1, 8, 73, 74, 25, 4, 1, 26, 1, 80, 1, 82, 1, 4, 85, 2, 29
Offset: 1

Views

Author

Reinhard Zumkeller, Jun 17 2002

Keywords

Comments

a(n) <= n; a(a(n)) = a(n); for all factors p^m of a(n): p=2 or p=4*k+1.

Examples

			a(90) = a(2*3*3*5) = a(2*(4*0+3)^2*(4*1+1)^1) = 2*1^2*5 = 10.
		

Crossrefs

Equals n / A097706(n).

Programs

  • Maple
    a:= n-> mul(`if`(irem(i[1], 4)=3, 1, i[1]^i[2]), i=ifactors(n)[2]):
    seq(a(n), n=1..100);  # Alois P. Heinz, Jun 09 2014
  • Mathematica
    a[n_] := n/Product[{p, e} = pe; If[Mod[p, 4] == 3, p^e, 1], {pe, FactorInteger[n]}];
    Array[a, 100] (* Jean-François Alcover, May 29 2019 *)
  • PARI
    a(n) = my(f=factor(n)); for (k=1, #f~, if ((f[k,1] % 4) == 3, f[k,1]=1)); factorback(f); \\ Michel Marcus, May 08 2017
  • Python
    from sympy import factorint
    from operator import mul
    def a(n):
        f = factorint(n)
        return 1 if n == 1 else reduce(mul, [1 if i%4==3 else i**f[i] for i in f])# Indranil Ghosh, May 08 2017
    

Formula

Multiplicative with a(p) = (if p==3 (mod 4) then 1 else p).

A202057 Numbers which are not perfect squares and such that all prime divisors are congruent to 1 or 2 mod 4.

Original entry on oeis.org

2, 5, 8, 10, 13, 17, 20, 26, 29, 32, 34, 37, 40, 41, 50, 52, 53, 58, 61, 65, 68, 73, 74, 80, 82, 85, 89, 97, 101, 104, 106, 109, 113, 116, 122, 125, 128, 130, 136, 137, 145, 146, 148, 149, 157, 160, 164, 170, 173, 178, 181, 185, 193, 194, 197, 200, 202, 205, 208, 212, 218, 221, 226, 229, 232, 233, 241, 244, 250, 257, 260, 265, 269, 272, 274
Offset: 1

Views

Author

Artur Jasinski, Dec 10 2011

Keywords

Comments

This sequence follows conjecture from A201278 that Mordell's elliptic curve x^3-y^2 = d can contain points {x,y} with quadratic extension sqrt(k) over rationals if and only k belongs to this sequence.
Members of A072437 that are not perfect squares. - Franklin T. Adams-Watters, Dec 15 2011

Examples

			a(3)=8 because 8 isn't perfect square and only one prime divisor 2 is congruent to 2 mod 4.
		

Crossrefs

Programs

  • Mathematica
    aa = {}; Do[pp = FactorInteger[j]; if = False; Do[If[Mod[pp[[n]][[1]], 4] == 3 || Mod[pp[[n]][[1]], 4] == 0, if = True], {n, 1, Length[pp]}]; If[if == False, If[IntegerQ[Sqrt[j]] == False, AppendTo[aa, j]]], {j, 2, 200}]; aa
    seqQ[n_] := !IntegerQ@Sqrt[n] && AllTrue[FactorInteger[n][[;; , 1]], MemberQ[{1, 2}, Mod[#, 4]] &]; Select[Range[300], seqQ] (* Amiram Eldar, Mar 21 2020 *)

A187811 Numbers having at least one prime factor of form 4*k+3.

Original entry on oeis.org

3, 6, 7, 9, 11, 12, 14, 15, 18, 19, 21, 22, 23, 24, 27, 28, 30, 31, 33, 35, 36, 38, 39, 42, 43, 44, 45, 46, 47, 48, 49, 51, 54, 55, 56, 57, 59, 60, 62, 63, 66, 67, 69, 70, 71, 72, 75, 76, 77, 78, 79, 81, 83, 84, 86, 87, 88, 90, 91, 92, 93, 94, 95, 96, 98, 99
Offset: 1

Views

Author

Reinhard Zumkeller, Jan 07 2013

Keywords

Comments

A005091(a(n)) > 0. - Reinhard Zumkeller, Jan 07 2013

Crossrefs

Cf. A072437 (complement); A002145, A009003.

Programs

  • Haskell
    import Data.List (findIndices)
    a187811 n = a187811_list !! (n-1)
    a187811_list = map (+ 1) $ findIndices (> 0) a005091_list
    -- Reinhard Zumkeller, Jan 07 2013
    
  • Mathematica
    pfQ[n_]:=AnyTrue[Transpose[FactorInteger[n]][[1]],Mod[#,4]==3&]; Select[ Range[100],pfQ] (* The program uses the AnyTrue function from Mathematica version 10 *) (* Harvey P. Dale, Jan 26 2016 *)
  • PARI
    is(n)=if(n%4==3,return(1)); my(f=factor(n)[,1]%4); for(i=1,#f, if(f[i]==3, return(1))); 0 \\ Charles R Greathouse IV, Sep 01 2015

Formula

a(n) ~ n. - Charles R Greathouse IV, Sep 01 2015

A204617 Multiplicative with a(p^e) = p^(e-1)*H(p). H(2) = 1, H(p) = p - 1 if p == 1 (mod 4) and H(p) = p + 1 if p == 3 (mod 4).

Original entry on oeis.org

1, 1, 4, 2, 4, 4, 8, 4, 12, 4, 12, 8, 12, 8, 16, 8, 16, 12, 20, 8, 32, 12, 24, 16, 20, 12, 36, 16, 28, 16, 32, 16, 48, 16, 32, 24, 36, 20, 48, 16, 40, 32, 44, 24, 48, 24, 48, 32, 56, 20, 64, 24, 52, 36, 48, 32, 80, 28, 60, 32, 60, 32, 96, 32, 48, 48, 68, 32
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Maple
    with(numtheory):
    a := n->add(jacobi(-1,d)*mobius(d)*n/d, d in divisors(n)):
    seq(a(n), n = 1..60); # Peter Bala, Dec 26 2023
  • Mathematica
    ar[p_,s_] := Which[Mod[p,4]==1, p^(s-1)*(p-1), Mod[p,4]==3, p^(s-1)*(p+1), True,p^(s-1)]; arit[1] = 1; arit[n_] := Product[ar[FactorInteger[n][[i,1]], FactorInteger[n][[i,2]]], {i, Length[FactorInteger[n]]}]; Array[arit, 100]
  • PARI
    A204617(n) = { my(f=factor(n),p); prod(i=1, #f~, p=f[i, 1]; (p^(f[i, 2]-1)) * if(2==p,1,if(1==(p%4),p-1,p+1))); }; \\ Antti Karttunen, Nov 16 2021

Formula

a(n) = phi(n) if n is in A072437.
Sum_{k=1..n} a(k) ~ c * n^2, where c = (3/8) * Product_{primes p == 1 (mod 4)} (1 - 1/p^2) * Product_{primes p == 3 (mod 4)} (1 + 1/p^2) = 3*A243381/(8*A175647) = 0.409404... . - Amiram Eldar, Dec 24 2022
a(n) = n*Product_{primes p, p | n} (1 - A034947(p)/p) = Sum_{d | n} A034947(d)* mobius(d)*n/d. Cf. A000010(n) = Sum_{d | n} mobius(d)*n/d. - Peter Bala, Dec 26 2023
a(n) = A079458(n)/A062570(n). - Ridouane Oudra, Jun 04 2024

A285510 Numbers k such that the average of the squarefree divisors of k is an integer.

Original entry on oeis.org

1, 3, 5, 6, 7, 9, 11, 12, 13, 14, 15, 17, 18, 19, 21, 22, 23, 24, 25, 27, 28, 29, 30, 31, 33, 35, 36, 37, 38, 39, 41, 42, 43, 44, 45, 46, 47, 48, 49, 51, 53, 54, 55, 56, 57, 59, 60, 61, 62, 63, 65, 66, 67, 69, 70, 71, 72, 73, 75, 76, 77, 78, 79, 81, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 101
Offset: 1

Views

Author

Ilya Gutkovskiy, Apr 20 2017

Keywords

Comments

Numbers n such that A034444(n)|A048250(n).
Numbers n such that 2^omega(n)|psi(rad(n)), where omega() is the number of distinct prime divisors (A001221), psi() is the Dedekind psi function (A001615) and rad() is the squarefree kernel (A007947).
From Robert Israel, Apr 24 2017: (Start)
All odd numbers are in the sequence.
A positive even number is in the sequence if and only if at least one of its prime factors is in A002145.
Thus this is the complement of 2*A072437 in the positive numbers.
(End)

Examples

			44 is in the sequence because 44 has 6 divisors {1, 2, 4, 11, 22, 44} among which 4 are squarefree {1, 2, 11, 22} and (1 + 2 + 11 + 22)/4 = 9 is an integer.
		

Crossrefs

Programs

  • Maple
    filter:= n -> n::odd or has(numtheory:-factorset(n) mod 4, 3):
    select(filter, [$1..1000]); # Robert Israel, Apr 24 2017
  • Mathematica
    Select[Range[100], IntegerQ[Total[Select[Divisors[#], SquareFreeQ]] / 2^PrimeNu[#]] &]
    Select[Range[110],IntegerQ[Mean[Select[Divisors[#],SquareFreeQ]]]&] (* Harvey P. Dale, Apr 11 2018 *)
    Select[Range[100], IntegerQ[Times @@ ((1 + FactorInteger[#][[;; , 1]])/2)] &] (* Amiram Eldar, Jul 01 2022 *)

Formula

a(n) ~ n (conjecture).
Conjecture is true, since A072437 has density 0. - Robert Israel, Apr 24 2017
Showing 1-10 of 13 results. Next