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 A376928 #19 Apr 26 2025 05:59:25 %S A376928 1,2,1,2,1,3,1,2,1,2,1,3,1,2,1,2,1,3,1,2,1,2,1,3,1,2,1,2,1,5,1,2,1,2, %T A376928 1,3,1,2,1,2,1,3,1,2,1,2,1,3,1,2,1,2,1,3,1,2,1,2,1,5,1,2,1,2,1,3,1,2, %U A376928 1,2,1,3,1,2,1,2,1,3,1,2,1,2,1,3,1,2,1,2,1,5,1,2,1,2,1,3,1,2,1,2,1,3,1,2,1 %N A376928 The largest noncomposite number k such that n is divisible by all the primes that do not exceed k. %C A376928 First differs from A062356 and A257993 at n = 30. %C A376928 The least index n such that a(n) = prime(k) is A002110(k). %C A376928 Let p be a prime and prev(p) = A151799(p) if p >= 3, and prev(2) = 1 (i.e., prev(p) is the largest noncomposite number that is smaller than p). Then, the asymptotic density of the occurrences of prev(p) in this sequence is 1/prev(p)# - 1/p#, where # denotes primorial (second definition, A034386). For example, the asymptotic densities of the occurrences of 1, 2, 3, 5 and 7 are 1/2, 1/3, 2/15, 1/35 and 1/231, respectively. %H A376928 Amiram Eldar, <a href="/A376928/b376928.txt">Table of n, a(n) for n = 1..10000</a> %F A376928 a(n) = 1 if and only if n is odd. %F A376928 a(n) = gpf(n) = A006530(n) if and only if n is in A055932. %F A376928 a(n) = prime(A276084(n)) = A000040(A276084(n)) if A276084(n) > 0, and 1 otherwise. %F A376928 primepi(a(n)) = A000720(a(n)) = A276084(n). %F A376928 A034386(a(n)) = A053589(n). %F A376928 a(n) = prev(A053669(n)), where prev(p) is defined in the Comments section. %F A376928 Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = Sum_{p prime} prev(p) * (1/prev(p)# - 1/p#) = 1.744663405017... (A377010). %e A376928 a(30) = 5 since 30 is divisible by all the primes <= 5, i.e., by 2, 3 and 5. %t A376928 a[n_] := Module[{p = 1}, While[Divisible[n, p], p = NextPrime[p]]; If[p > 2, NextPrime[p, -1], 1]]; Array[a, 100] %o A376928 (PARI) a(n) = {my(p = 1); while(!(n % p), p = nextprime(p+1)); if(p > 2, precprime(p-1), 1);} %Y A376928 Cf. A000040, A000720, A002110, A006530, A034386, A053589, A053669, A055881, A055932, A062356, A151799, A257993, A276084, A377010. %K A376928 nonn,easy %O A376928 1,2 %A A376928 _Amiram Eldar_, Oct 11 2024