%I #44 Sep 20 2023 20:23:05
%S 2,6,8,9,12,16,17,18,20,24,25,26,27,28,32,35,36,40,44,45,48,50,52,53,
%T 54,56,60,62,63,64,68,71,72,75,76,80,81,84,85,88,89,90,92,96,98,99,
%U 100,104,107,108,112,116,117
%N Numbers n such that concatenation of numbers from 1 to n is nonsquarefree.
%C All positive multiples of 4 are in this sequence other than 4. Similarly, all numbers which are 0 or 8 mod 9 are in this sequence and all multiples of 25 are in this sequence. - _Charles R Greathouse IV_, Sep 20 2012
%H Patrick De Geest, <a href="http://www.worldofnumbers.com/factorlist.htm">Normal Smarandache Concatenated Numbers, Prime factors from 1 up to n</a>
%H M. Fleuren, <a href="http://www.gallup.unm.edu/~smarandache/michafleuren.htm">Factors and primes of Smarandache sequences</a>.
%H M. Fleuren, <a href="http://www.gallup.unm.edu/~smarandache/micha.txt">Smarandache Factors and Reverse factors</a>
%H Carlos Rivera, <a href="http://www.primepuzzles.net/puzzles/puzz_008.htm">Puzzle 8. Primes by Listing</a>, The Prime Puzzles & Problems Connection.
%F n < a(n) < 2.4n for n > 10. The upper constant can be lowered to 25/11 with more work. - _Charles R Greathouse IV_, Sep 20 2012
%e 6 is a term because 123456 = 2*2*2*2*2*2*3*643 = 2^6*3*643, not squarefree.
%t t={}; m=1; Do[m=FromDigits[Flatten[IntegerDigits[{m,n}]]]; If[!SquareFreeQ[m],AppendTo[t,n]],{n,2,32}]; t (* _Jayanta Basu_, May 30 2013 *)
%t Module[{nn=120,cct},cct=Table[If[SquareFreeQ[FromDigits[Flatten[IntegerDigits/@Range[ n]]]],0,1],{n,nn}];Position[cct,_?(#==1&)]]//Flatten (* _Harvey P. Dale_, Sep 20 2023 *)
%o (Magma) a:=[];c:=1; for n in [2..55] do c:=c*10^#Intseq(n)+n; if not IsSquarefree(c) then Append(~a,n); end if; end for; a; // _Marius A. Burtea_, Oct 15 2019
%o (PARI) conc(n) = my(s=""); for(k=1, n, s=Str(s, k)); eval(s); \\ A007908
%o isok(n) = ! issquarefree(conc(n)); \\ _Michel Marcus_, Oct 16 2019
%Y Cf. A013929, A007908, A048342, A050687, A050688.
%K nonn,base,hard,less
%O 1,1
%A _Patrick De Geest_, Aug 15 1999
%E Corrected by _Charles R Greathouse IV_, Sep 20 2012
%E More terms from _Sean A. Irvine_, Aug 16 2021