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 A284048 #11 Feb 16 2025 08:33:43 %S A284048 1,3,5,4,12,13,14,2,6,10,15,17,8,19,30,34,47,74,7,9,16,11,21,28,36,45, %T A284048 76,49,32,89,39,25,24,40,41,23,26,38,43,78,50,31,18,46,35,29,20,44,37, %U A284048 27,22,42,79,90,153,103,66,55,70,51,77,48,33,88,81,162,94,75,53,68,57,64,61,60,65,56,69,52,73,96,147 %N A284048 a(n) is the smallest positive integer not already in the sequence such that a(n) + a(n-1) is a proper prime power (A246547), with a(1) = 1. %H A284048 Robert Israel, <a href="/A284048/b284048.txt">Table of n, a(n) for n = 1..10000</a> %H A284048 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/PrimePower.html">Prime Power</a> %H A284048 <a href="/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the natural numbers</a> %e A284048 a(5) = 12 because 1, 3, 4 and 5 have already been used in the sequence, 4 + 2 = 6, 4 + 6 = 10, 4 + 7 = 11, 4 + 8 = 12, 4 + 9 = 13, 4 + 10 = 14 and 4 + 11 = 15 are not proper prime powers while 4 + 12 = 16 is a proper prime power. %p A284048 N:= 2000: # to get all terms before the first where a(n)+a(n-1)>N %p A284048 PP:= {seq(seq(p^j, j =2..floor(log[p](N))),p = select(isprime,[2,seq(i,i=3..floor(sqrt(N)),2)]))}: %p A284048 PP:= sort(convert(PP,list)): %p A284048 V:= Vector(N,datatype=integer[1],1): %p A284048 A[1]:= 1; V[1]:= 0; %p A284048 for n from 2 do %p A284048 for pp in PP do %p A284048 t:= pp - A[n-1]; %p A284048 if t > 0 and V[t] = 1 then %p A284048 A[n]:= t; V[t]:= 0; break %p A284048 fi; %p A284048 od; %p A284048 if not assigned(A[n]) then break fi %p A284048 od: %p A284048 seq(A[i],i=1..n-1); # _Robert Israel_, Apr 24 2017 %t A284048 f[s_List] := Block[{k = 1, a = s[[-1]]}, While[MemberQ[s, k] || ! (PrimePowerQ[a + k] && PrimeOmega[a + k] > 1), k++];Append[s, k]]; Nest[f, {1}, 80] %Y A284048 Cf. A055265, A055266, A121878, A228730, A243625, A246547, A284049. %K A284048 look,nonn %O A284048 1,2 %A A284048 _Ilya Gutkovskiy_, Mar 19 2017