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 A137509 #17 May 30 2025 15:04:30 %S A137509 2,3,5,9,11,14,17,27,49,51,53,63,67,69,74,81,83,92,97,98,106,111,113, %T A137509 135,169,177,343,356,359,366,367,3125,3127,3131,3133,3249,3251,3254, %U A137509 3261,3272,3299,3302,3307,3308,3316,3317,3319,3321,3481,3501,3503,3508 %N A137509 a(1)=2. For n >= 2, a(n) = the smallest integer > a(n-1) that has the same multiset of prime-factorization exponents as n has. %C A137509 Starting the sequence at a(1)=1 instead leads to a(n) = n for every positive integer n. %H A137509 James C. McMahon, <a href="/A137509/b137509.txt">Table of n, a(n) for n = 1..1000</a> %e A137509 12 = 2^2 * 3^1. So the multiset of exponents in the prime factorization of 12 is {1,2}. For a(12), we want the smallest integer > a(11)=53 of the form p^1 * q^2, where p and q are distinct primes. Checking: 54 = 2^1 *3^3, so 54 fails. 55 = 5^1*11^1. 56 = 2^3*7^1. 57 = 3^1*19^1. 58 = 2^1*29^1. 59=59^1. 60 = 2^2*3^1*5^1. 61 = 61^1. 62 = 2^1 *31^1. So 54 through 62 all fail. But 63 = 3^2 * 7^1, which has the same multiset of prime exponents, {1,2}, as 12 has. Therefore a(12) = 63. %p A137509 pmset := proc(n) local e,a ; a := [] ; for e in ifactors(n)[2] do a := [op(a),e[2]] ; od: sort(a) ; end: A137509 := proc(n) option remember ; local nset,a ; if n = 1 then RETURN(2) ; fi ; nset := pmset(n) ; for a from A137509(n-1)+1 do if pmset(a) = nset then RETURN(a) ; fi ; od: end: seq(A137509(n),n=1..120) ; # _R. J. Mathar_, May 23 2008 %t A137509 s={2};Do[fe=Sort[Last/@FactorInteger[n]];k=s[[-1]]+1;While[Sort[Last/@FactorInteger[k]]!=fe,k++];AppendTo[s,k],{n,2,52}];s (* _James C. McMahon_, May 30 2025 *) %o A137509 (PARI) lista(nn) = my(va = vector(nn)); va[1] = 2; for (n=2, nn, my(k=va[n-1]+1, f=vecsort(factor(n)[,2])); while (vecsort(factor(k)[,2]) != f, k++); va[n] = k;); va; \\ _Michel Marcus_, May 30 2025 %Y A137509 Cf. A081761. %K A137509 nonn %O A137509 1,1 %A A137509 _Leroy Quet_, Apr 23 2008 %E A137509 More terms from _R. J. Mathar_, May 23 2008