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.
%I A217983 #50 Jan 17 2025 09:08:15 %S A217983 1,2,3,2,1,1,1,2,3,5,1,1,1,1,1,2,1,1,1,1,7,1,1,1,1,1,3,1,1,1,1,2,1,1, %T A217983 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,5,1,1,1,1,11,1,1,1,1,1,1,1,1,2,1,1,1,1, %U A217983 1,1,1,1,1,1,1,1,1,13,1,1,3,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 %N A217983 If n = floor(p/2) * p^e, for some (by necessity unique) prime p and exponent e > 0, then a(n) = p, otherwise a(n) = 1. %C A217983 a(A130290(n) * A000040(n)^n1) = A000040(n), n >= 1 and n1 >= 1, and a(n) = 1 elsewhere. - The original name of the sequence. %C A217983 The a(n) are related to the prime numbers A000040 and the number of nonzero quadratic residues modulo the n-th prime A130290, see the first formula and the Maple program. %C A217983 This sequence resembles the exponential of the von Mangoldt function A014963; for the latter sequence a(A000040(n)^n1) = A000040(n), n >= 1 and n1 >= 1, and a(n) = 1 elsewhere. %C A217983 Positions of the first occurrence of each successive noncomposite number (and also the records) is given by the union of {2} and A008837. - _Antti Karttunen_, Jan 17 2025 %H A217983 Antti Karttunen, <a href="/A217983/b217983.txt">Table of n, a(n) for n = 1..100949</a> %F A217983 a(A130290(n) * A000040(n)^n1) = A000040(n), n >= 1 and n1 >= 1, and a(n)= 1 elsewhere. %F A217983 a(n) = (A160479(n+1) * A128060(n+1))/(2*n+1) for n >= 2. %p A217983 nmax := 78: A000040 := proc(n): ithprime(n) end: A130290 := proc(n): if n =1 then 1 else (A000040(n)-1)/2 fi: end: for n from 1 to nmax do A217983(n) := 1 od: for n from 1 to nmax do for n1 from 1 to floor(log[A000040(n)](nmax)) do A217983(A130290(n) * A000040(n)^n1) := A000040(n) od: od: seq(A217983(n), n=1..nmax); %o A217983 (PARI) A217983(n) = { my(f=factor(n)); for(i=1,#f~,if((n/(f[i,1]^f[i,2])) == (f[i,1]\2), return(f[i,1]))); (1); }; \\ _Antti Karttunen_, Jan 16 2025 %Y A217983 Cf. A000040, A014963, A128060, A130290, A160479. %Y A217983 Cf. A000079, A000244 (after their initial 1's, the positions of 2's and 3's respectively), A020699 (positions of 5's from its third term 10 onward), A169634 (positions of 7's from the second term onward), A379956 (positions of terms > 1). %Y A217983 Cf. A008837, A121057. %K A217983 nonn %O A217983 1,2 %A A217983 _Johannes W. Meijer_, Oct 25 2012 %E A217983 Definition simplified, original definition moved to comments; more terms added by _Antti Karttunen_, Jan 16 2025