A378032 a(1) = a(2) = 1; a(n>2) is the greatest nonsquarefree number < prime(n).
1, 1, 4, 4, 9, 12, 16, 18, 20, 28, 28, 36, 40, 40, 45, 52, 56, 60, 64, 68, 72, 76, 81, 88, 96, 100, 100, 104, 108, 112, 126, 128, 136, 136, 148, 150, 156, 162, 164, 172, 176, 180, 189, 192, 196, 198, 208, 220, 225, 228, 232, 236, 240, 250, 256, 261, 268, 270
Offset: 1
Keywords
Examples
The terms together with their prime indices begin: 1: {} 1: {} 4: {1,1} 4: {1,1} 9: {2,2} 12: {1,1,2} 16: {1,1,1,1} 18: {1,2,2} 20: {1,1,3} 28: {1,1,4} 28: {1,1,4} 36: {1,1,2,2} 40: {1,1,1,3} 40: {1,1,1,3} 45: {2,2,3} 52: {1,1,6} 56: {1,1,1,4} 60: {1,1,2,3} 64: {1,1,1,1,1,1} 68: {1,1,7} 72: {1,1,1,2,2}
Crossrefs
Programs
-
Mathematica
Table[NestWhile[#-1&,Prime[n],#>1&&SquareFreeQ[#]&],{n,100}]
Formula
a(n) = A378033(prime(n)).