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

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

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

A170817 a(n) = product of distinct primes of form 4k+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, 5, 13, 1, 1, 29, 5, 1, 1, 1, 17, 5, 1, 37, 1, 13, 5, 41, 1, 1, 1, 5, 1, 1, 1, 1, 5, 17, 13, 53, 1, 5, 1, 1, 29, 1, 5, 61, 1, 1, 1, 65, 1, 1, 17, 1, 5, 1, 1, 73, 37, 5, 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

Crossrefs

Programs

  • Maple
    a:= n-> mul (i, i=map (x-> x[1], select (x-> isprime (x[1]) and irem (x[1], 4)=1, ifactors(n)[2]))): seq (a(n), n=1..120);
  • Mathematica
    Table[Times@@Select[Transpose[FactorInteger[n]][[1]],Mod[#,4]==1&], {n,90}] (* Harvey P. Dale, Dec 07 2012 *)
  • PARI
    a(n) = {my(f = factor(n)); prod(i = 1, #f~, if(f[i,1] % 4 == 1, f[i,1], 1));} \\ Amiram Eldar, Jun 09 2025

Extensions

Corrected and extended with Maple program by Alois P. Heinz, Dec 23 2009

A170825 a(n) is the product of the distinct primes of form 6*k-1 that divide n.

Original entry on oeis.org

1, 1, 1, 1, 5, 1, 1, 1, 1, 5, 11, 1, 1, 1, 5, 1, 17, 1, 1, 5, 1, 11, 23, 1, 5, 1, 1, 1, 29, 5, 1, 1, 11, 17, 5, 1, 1, 1, 1, 5, 41, 1, 1, 11, 5, 23, 47, 1, 1, 5, 17, 1, 53, 1, 55, 1, 1, 29, 59, 5, 1, 1, 1, 1, 5, 11, 1, 17, 23, 5, 71, 1, 1, 1, 5, 1, 11, 1, 1, 5, 1, 41, 83, 1, 85, 1, 29, 11, 89, 5, 1
Offset: 1

Views

Author

N. J. A. Sloane, Dec 25 2009, following a suggestion from Jonathan Vos Post

Keywords

Crossrefs

Cf. A140214. - R. J. Mathar, Jan 21 2010

Programs

  • Maple
    A170825 := proc(n) a := 1 ; for p in numtheory[factorset](n) do if p mod 6 = 5 then a := a*p ; end if ; end do ; a ; end proc: seq(A170825(n),n=1..120) ; # R. J. Mathar, Jan 21 2010
  • Mathematica
    Table[Times@@Select[Transpose[FactorInteger[n]][[1]],IntegerQ[(#+1)/6]&],{n,100}] (* Harvey P. Dale, Nov 01 2013 *)
  • PARI
    a(n) = my(f=factor(n)); for(i=1, #f~, f[i,2] = (f[i,1]%6)==5); factorback(f); \\ Michel Marcus, Sep 30 2020

Formula

a(n) = A007947(A343431(n)) = A343431(A007947(n)). - Peter Munn, Jan 15 2022

Extensions

More terms from R. J. Mathar, Jan 21 2010

A363340 a(n) is the smallest positive integer such that a(n) * n is the sum of two squares.

Original entry on oeis.org

1, 1, 3, 1, 1, 3, 7, 1, 1, 1, 11, 3, 1, 7, 3, 1, 1, 1, 19, 1, 21, 11, 23, 3, 1, 1, 3, 7, 1, 3, 31, 1, 33, 1, 7, 1, 1, 19, 3, 1, 1, 21, 43, 11, 1, 23, 47, 3, 1, 1, 3, 1, 1, 3, 11, 7, 57, 1, 59, 3, 1, 31, 7, 1, 1, 33, 67, 1, 69, 7, 71, 1, 1, 1, 3, 19, 77, 3, 79
Offset: 1

Views

Author

Peter Schorn, May 28 2023

Keywords

Comments

Using Fermat's two-squares theorem it is easy to see that a(n) is the product of all prime factors of n that are congruent to 3 modulo 4 and have an odd exponent.
This implies that a(n) is also the smallest positive integer such that n / a(n) is the sum of two squares.
Equivalently, a(n) is the product of all primes of the form 4k+3 that divide the squarefree part of n. If we use the squarefree kernel instead, we get A170819. - Peter Munn, Aug 06 2023

Examples

			a(1) = a(2) = 1 since 1 and 2 are sums of two squares.
a(3) = 3 since 3 and 6 are not sums of two squares but 3*3 is.
a(6) = 3 since 6 and 12 are not sums of two squares but 3*6 = 3^2 + 3^2.
		

Crossrefs

Cf. A001481 (positions of 1's), A167181 (range of values).
Fixed points: A167181.

Programs

  • PARI
    a(n) = my(r=1); foreach(mattranspose(factor(n)), f, if(f[1]%4==3&&f[2]%2==1, r*=f[1])); r

Formula

Multiplicative with a(p^e) = p if p^e == 3 (mod 4), otherwise 1. - Peter Munn, Jul 03 2023
From Peter Munn, Aug 06 2023: (Start)
a(n) = A007913(A097706(n)) = A097706(A007913(n)).
a(n) == A000265(n) (mod 4).
a(A059897(n, k)) = A059897(a(n), a(k)).
(End)
Showing 1-5 of 5 results.