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

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

A170819 a(n) = product of distinct primes of the form 4k-1 that divide n.

Original entry on oeis.org

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

Views

Author

N. J. A. Sloane, Dec 23 2009

Keywords

Crossrefs

Programs

  • Maple
    A170819 := proc(n) a := 1 ; for p in numtheory[factorset](n) do if p mod 4 = 3 then a := a*p ; end if; end do: a ; end proc:
    seq(A170819(n),n=1..20) ; # R. J. Mathar, Jun 07 2011
  • Mathematica
    Array[Times @@ Select[FactorInteger[#][[All, 1]], Mod[#, 4] == 3 &] &, 85] (* Michael De Vlieger, Feb 19 2019 *)
  • PARI
    for(n=1,99, t=select(x->x%4==3, factor(n)[,1]); print1(prod(i=1,#t,t[i])","))

Formula

Multiplicative with a(p^e) = p^A011765(p+1), e > 0. - R. J. Mathar, Jun 07 2011
a(n) = A007947(A097706(n)) = A097706(A007947(n)). - Peter Munn, Jul 06 2023

Extensions

Extended with PARI program by M. F. Hasler, Dec 23 2009

A170824 a(n) = product of distinct primes of form 6k+1 that divide n.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 7, 1, 1, 1, 1, 1, 13, 7, 1, 1, 1, 1, 19, 1, 7, 1, 1, 1, 1, 13, 1, 7, 1, 1, 31, 1, 1, 1, 7, 1, 37, 19, 13, 1, 1, 7, 43, 1, 1, 1, 1, 1, 7, 1, 1, 13, 1, 1, 1, 7, 19, 1, 1, 1, 61, 31, 7, 1, 13, 1, 67, 1, 1, 7, 1, 1, 73, 37, 1, 19, 7, 13, 79, 1, 1, 1, 1, 7, 1, 43, 1, 1, 1, 1, 91, 1, 31, 1
Offset: 1

Views

Author

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

Keywords

Crossrefs

Cf. A140213. [R. J. Mathar, Jan 21 2010]
Differs from A248909 for the first time at n=49, where a(49) = 7, while A248909(49) = 49.

Programs

  • Maple
    A170824 := proc(n) a := 1 ; for p in numtheory[factorset](n) do if p mod 6 = 1 then a := a*p ; end if ; end do ; a ; end proc:
    A140213 := proc(n) a := 1 ; for p in numtheory[divisors](n) do if p mod 6 = 1 then a := a*p ; end if ; end do ; a ; end proc:
    seq(A170824(n),n=1..120) ; # R. J. Mathar, Jan 21 2010
  • Mathematica
    test[p_] := IntegerQ[(p - 1)/6]; a[n_]:= Module[{aux = FactorInteger[n]}, Product[If[test[aux[[i, 1]]],aux[[i, 1]],1],{i, Length[aux]}]]; Table[a[n], {i, 1, 200}] (* Jose Grau, Feb 16 2010 *)
    Table[Times@@Select[Transpose[FactorInteger[n]][[1]],IntegerQ[(#-1)/6]&],{n,100}] (* Harvey P. Dale, Jul 29 2013 *)
  • PARI
    a(n) = my(f=factor(n)); prod(k=1, #f~, if (((p=f[k,1])%6) == 1, p, 1)); \\ Michel Marcus, Jul 10 2017
  • Scheme
    (define (A170824 n) (if (= 1 n) n (* (if (= 1 (modulo (A020639 n) 6)) (A020639 n) 1) (A170824 (A028234 n))))) ;; Antti Karttunen, Jul 09 2017
    

Formula

a(1) = 1; for n > 1, if A020639(n) = 1 (mod 6), a(n) = A020639(n) * a(A028234(n)), otherwise a(n) = a(A028234(n)). - Antti Karttunen, Jul 09 2017

Extensions

More terms from R. J. Mathar, Jan 21 2010
Showing 1-3 of 3 results.