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.

A097246 Replace factors of n that are squares of a prime with the prime succeeding this prime.

This page as a plain text file.
%I A097246 #31 Aug 29 2024 21:00:09
%S A097246 1,2,3,3,5,6,7,6,5,10,11,9,13,14,15,9,17,10,19,15,21,22,23,18,7,26,15,
%T A097246 21,29,30,31,18,33,34,35,15,37,38,39,30,41,42,43,33,25,46,47,27,11,14,
%U A097246 51,39,53,30,55,42,57,58,59,45,61,62,35,27,65,66,67,51,69,70,71,30,73
%N A097246 Replace factors of n that are squares of a prime with the prime succeeding this prime.
%H A097246 Antti Karttunen, <a href="/A097246/b097246.txt">Table of n, a(n) for n = 1..10000</a>
%F A097246 Multiplicative with p^e -> NextPrime(p)^floor(e/2) * p^(e mod 2), where p prime and NextPrime(p)=A000040(A049084(p)+1).
%F A097246 a(n) <= n; a(n) = n iff n is squarefree: a(A005117(n)) = A005117(n);
%F A097246 a(m*n) <= a(m)*a(n); a(m*n) = a(m)*a(n) iff m and n are coprime;
%F A097246 a(A000040(k)^n) = A000040(k+1)^floor(n/2)*A000040(k)^(n mod 2); a(2^n) = 3^floor(n/2) * (1 + n mod 2);
%F A097246 a(A000040(k)*A002110(n)/A002110(k-1)) = A000040(k+1)*A002110(n)/A002110(k) for k <= n, see also A097250.
%F A097246 From _Antti Karttunen_, Nov 15 2016: (Start)
%F A097246 a(1) = 1; for n > 1, a(n) = 2^A000035(A007814(n)) * 3^A004526(A007814(n)) * A003961(a(A064989(n))).
%F A097246 a(n) = A003961(A000188(n)) * A007913(n).
%F A097246 A048675(a(n)) = A048675(n).
%F A097246 (End)
%F A097246 Sum_{k=1..n} a(k) ~ c * n^2, where c = (1/2) * Product_{p prime} (p^4-p^2)/(p^4-nextprime(p)) = 0.4059779303..., where nextprime is A151800. - _Amiram Eldar_, Nov 29 2022
%t A097246 Table[Times @@ Map[#1^#2 & @@ # &, Partition[#, 2, 2] &@ Flatten[ FactorInteger[n] /. {p_, e_} /; e >= 2 :> {If[OddQ@ e, {p, 1}, {1, 1}], {NextPrime@ p, Floor[e/2]}}]], {n, 73}] (* _Michael De Vlieger_, Mar 18 2017 *)
%o A097246 (PARI) A097246(n) = { my(f=factor(n)); prod(i=1, #f~, (nextprime(f[i, 1]+1)^(f[i,2]\2))*((f[i,1])^(f[i,2]%2))); }; \\ _Antti Karttunen_, Mar 18 2017
%o A097246 (Scheme)
%o A097246 (definec (A097246 n) (if (= 1 n) 1 (* (A000244 (A004526 (A007814 n))) (A000079 (A000035 (A007814 n))) (A003961 (A097246 (A064989 n))))))
%o A097246 (define (A097246 n) (* (A003961 (A000188 n)) (A007913 n)))
%o A097246 ;; _Antti Karttunen_, Nov 15 2016
%o A097246 (Python)
%o A097246 from sympy import factorint, nextprime
%o A097246 from operator import mul
%o A097246 def a(n):
%o A097246     f=factorint(n)
%o A097246     return 1 if n==1 else reduce(mul, [(nextprime(i)**int(f[i]/2))*(i**(f[i]%2)) for i in f]) # _Indranil Ghosh_, May 15 2017
%Y A097246 Cf. A000035, A000040, A002110, A049084, A097250, A000079, A000188, A000244, A003961, A004526, A005117, A007814, A007913, A048675, A064989, A151800.
%Y A097246 Cf. A097247, A097248 (fixed points of iteration), A097249 (number of iterations needed to reach them for each n), A277886, A277899.
%K A097246 nonn,mult
%O A097246 1,2
%A A097246 _Reinhard Zumkeller_, Aug 03 2004