login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

Write the square of 1st prime, then the 2nd prime, then the square of 3rd prime, alternately squaring or not.
1

%I #12 Jul 30 2024 16:34:37

%S 4,3,25,7,121,13,289,19,529,29,961,37,1681,43,2209,53,3481,61,4489,71,

%T 5329,79,6889,89,9409,101,10609,107,11881,113,16129,131,18769,139,

%U 22201,151,24649,163,27889,173,32041,181,36481,193,38809,199,44521,223,51529,229,54289,239,58081,251,66049,263,72361,271,76729,281,80089,293

%N Write the square of 1st prime, then the 2nd prime, then the square of 3rd prime, alternately squaring or not.

%D J.-P. Delahaye, Des suites fractales d’entiers, Pour la Science, No. 531 January 2022. Sequence f) p. 82.

%p [seq(ithprime(n)^(1+(n mod 2)),n=1..80)]; # _N. J. A. Sloane_, Dec 18 2021

%t {#[[1]]^2,#[[2]]}&/@Partition[Prime[Range[70]],2]//Flatten (* _Harvey P. Dale_, Jul 30 2024 *)

%o (Python)

%o from sympy import prime

%o def A350173(n): return prime(n)**(n%2+1) # _Chai Wah Wu_, Dec 19 2021

%Y Cf. A000040, A001248.

%K nonn

%O 1,1

%A _Michel Marcus_, Dec 18 2021