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.

A065338 a(1) = 1, a(p) = p mod 4 for p prime and a(u * v) = a(u) * a(v) for u, v > 0.

Original entry on oeis.org

1, 2, 3, 4, 1, 6, 3, 8, 9, 2, 3, 12, 1, 6, 3, 16, 1, 18, 3, 4, 9, 6, 3, 24, 1, 2, 27, 12, 1, 6, 3, 32, 9, 2, 3, 36, 1, 6, 3, 8, 1, 18, 3, 12, 9, 6, 3, 48, 9, 2, 3, 4, 1, 54, 3, 24, 9, 2, 3, 12, 1, 6, 27, 64, 1, 18, 3, 4, 9, 6, 3, 72, 1, 2, 3, 12, 9, 6, 3, 16, 81, 2, 3, 36, 1, 6, 3, 24, 1, 18, 3
Offset: 1

Views

Author

Reinhard Zumkeller, Oct 29 2001

Keywords

Examples

			a(120) = a(2*2*2*3*5) = a(2)*a(2)*a(2)*a(3)*a(5) = 2*2*2*3*1 = 24.
a(150) = a(2*3*5*5) = a(2)*a(3)*a(5)*a(5) = 2*3*1*1 = 6.
a(210) = a(2*3*5*7) = a(2)*a(3)*a(5)*a(7) = 2*3*1*3 = 18.
		

Crossrefs

Programs

  • Haskell
    a065338 1 = 1
    a065338 n = (spf `mod` 4) * a065338 (n `div` spf) where spf = a020639 n
    -- Reinhard Zumkeller, Nov 18 2011
    
  • Mathematica
    a[1] = 1; a[n_] := a[n] = Mod[p = FactorInteger[n][[1, 1]], 4]*a[n/p]; Table[ a[n], {n, 1, 100} ] (* Jean-François Alcover, Jan 20 2012 *)
  • PARI
    a(n)=my(f=factor(n)); prod(i=1,#f~, (f[i,1]%4)^f[i,2]) \\ Charles R Greathouse IV, Feb 07 2017

Formula

a(n) = 1 if n = 1, otherwise (A020639(n) mod 4) * n / A020639(n).
a(n) = (2^A007814(n)) * (3^A065339(n)).
a(n) <= n.
a(a(n)) = a(n).
a(x) = x iff x = 2^i * 3^j for i, j >= 0.
a(A003586(n)) = A003586(n).
a(A065331(n)) = A065331(n).
a(A004613(n)) = 1; A065333(a(n)) = 1. - Reinhard Zumkeller, Jul 10 2010
Dirichlet g.f.: (1/(1-2^(-s+1))) * Product_{prime p=4k+1} (1/(1-p^(-s))) * Product_{prime p=4k+3} 1/(1-3*p^(-s)). - Ralf Stephan, Mar 28 2015