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-4 of 4 results.

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

A170818 a(n) is the product of primes (with multiplicity) of form 4*k+1 that divide n.

Original entry on oeis.org

1, 1, 1, 1, 5, 1, 1, 1, 1, 5, 1, 1, 13, 1, 5, 1, 17, 1, 1, 5, 1, 1, 1, 1, 25, 13, 1, 1, 29, 5, 1, 1, 1, 17, 5, 1, 37, 1, 13, 5, 41, 1, 1, 1, 5, 1, 1, 1, 1, 25, 17, 13, 53, 1, 5, 1, 1, 29, 1, 5, 61, 1, 1, 1, 65, 1, 1, 17, 1, 5, 1, 1, 73, 37, 25, 1, 1, 13, 1, 5, 1, 41, 1, 1, 85, 1, 29, 1
Offset: 1

Views

Author

N. J. A. Sloane, Dec 22 2009

Keywords

Comments

Completely multiplicative with a(p) = p if p = 4k+1 and a(p) = 1 otherwise. - Tom Edgar, Mar 05 2015

Crossrefs

Programs

  • Maple
    a:= n-> mul(`if`(irem(i[1], 4)=1, 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] == 1, p^e, 1], {pe, FactorInteger[n]}];
    Array[a, 100] (* Jean-François Alcover, May 29 2019 *)
  • PARI
    a(n)=my(f=factor(n)); prod(i=1,#f~,if(f[i,1]%4>1,1,f[i,1])^f[i,2]) \\ Charles R Greathouse IV, Jun 28 2015
    
  • Python
    from sympy import factorint, prod
    def a072438(n):
        f = factorint(n)
        return 1 if n == 1 else prod(i**f[i] for i in f if i % 4 != 1)
    def a(n): return n//a072438(n) # Indranil Ghosh, May 08 2017

Formula

a(n) = n/A072438(n). - Michel Marcus, Mar 05 2015

A286361 Least number with the same prime signature as {the largest divisor of n with only prime factors of the form 4k+1} has: a(n) = A046523(A170818(n)).

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 1, 1, 1, 2, 1, 1, 2, 1, 2, 1, 2, 1, 1, 2, 1, 1, 1, 1, 4, 2, 1, 1, 2, 2, 1, 1, 1, 2, 2, 1, 2, 1, 2, 2, 2, 1, 1, 1, 2, 1, 1, 1, 1, 4, 2, 2, 2, 1, 2, 1, 1, 2, 1, 2, 2, 1, 1, 1, 6, 1, 1, 2, 1, 2, 1, 1, 2, 2, 4, 1, 1, 2, 1, 2, 1, 2, 1, 1, 6, 1, 2, 1, 2, 2, 2, 1, 1, 1, 2, 1, 2, 1, 1, 4, 2, 2, 1, 2, 2, 2, 1, 1, 2, 2, 2, 1, 2, 1, 2, 2, 2, 1, 2, 2
Offset: 1

Views

Author

Antti Karttunen, May 08 2017

Keywords

Crossrefs

Differs from A063014 for the first time at n=25, where a(25) = 4, while A063014(25) = 3.

Programs

  • Python
    from sympy import factorint
    from operator import mul
    def P(n):
        f = factorint(n)
        return sorted([f[i] for i in f])
    def a046523(n):
        x=1
        while True:
            if P(n) == P(x): return x
            else: x+=1
    def a072438(n):
        f = factorint(n)
        return 1 if n == 1 else reduce(mul, [1 if i%4==1 else i**f[i] for i in f])
    def a(n): return a046523(n/a072438(n)) # Indranil Ghosh, May 09 2017
  • Scheme
    (define (A286361 n) (A046523 (A170818 n)))
    

Formula

a(n) = A046523(A170818(n)).
a(n) = A286363(A267099(n)).

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).
Showing 1-4 of 4 results.