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.

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

This page as a plain text file.
%I A170824 #28 Jul 09 2025 04:31:32
%S A170824 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,
%T A170824 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,
%U A170824 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
%N A170824 a(n) = product of distinct primes of form 6k+1 that divide n.
%H A170824 Antti Karttunen, <a href="/A170824/b170824.txt">Table of n, a(n) for n = 1..10001</a>
%F A170824 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
%p A170824 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:
%p A170824 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:
%p A170824 seq(A170824(n),n=1..120) ; # _R. J. Mathar_, Jan 21 2010
%t A170824 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 *)
%t A170824 Table[Times@@Select[Transpose[FactorInteger[n]][[1]],IntegerQ[(#-1)/6]&],{n,100}] (* _Harvey P. Dale_, Jul 29 2013 *)
%o A170824 (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
%o A170824 (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
%Y A170824 Cf. A002476, A170817.
%Y A170824 Cf. A140213. [_R. J. Mathar_, Jan 21 2010]
%Y A170824 Differs from A248909 for the first time at n=49, where a(49) = 7, while A248909(49) = 49.
%K A170824 nonn,mult
%O A170824 1,7
%A A170824 _N. J. A. Sloane_, Dec 25 2009, following a suggestion from _Jonathan Vos Post_
%E A170824 More terms from _R. J. Mathar_, Jan 21 2010