login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A170824 a(n) = product of distinct primes of form 6k+1 that divide n. 4

%I #26 Jul 10 2017 03:59:43

%S 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 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 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 a(n) = product of distinct primes of form 6k+1 that divide n.

%H Antti Karttunen, <a href="/A170824/b170824.txt">Table of n, a(n) for n = 1..10001</a>

%F 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 := 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 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 seq(A170824(n),n=1..120) ; # _R. J. Mathar_, Jan 21 2010

%t 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 Table[Times@@Select[Transpose[FactorInteger[n]][[1]],IntegerQ[(#-1)/6]&],{n,100}] (* _Harvey P. Dale_, Jul 29 2013 *)

%o (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 (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 Cf. A002476, A170817.

%Y Cf. A140213. [_R. J. Mathar_, Jan 21 2010]

%Y Differs from A248909 for the first time at n=49, where a(49) = 7, while A248909(49) = 49.

%K nonn,mult

%O 1,7

%A _N. J. A. Sloane_, Dec 25 2009, following a suggestion from _Jonathan Vos Post_.

%E More terms from _R. J. Mathar_, Jan 21 2010

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 10:34 EDT 2024. Contains 371967 sequences. (Running on oeis4.)