cp's OEIS Frontend

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.

A192504 Ludic nonprime numbers.

This page as a plain text file.
%I A192504 #20 Nov 04 2024 20:53:03
%S A192504 1,25,77,91,115,119,121,143,161,175,209,221,235,247,265,287,301,329,
%T A192504 341,361,377,407,415,437,445,475,481,493,497,517,527,535,553,565,581,
%U A192504 595,625,667,685,697,703,707,749,775,791,803,805,835,841,851,865,893,913
%N A192504 Ludic nonprime numbers.
%C A192504 The sequence appears to have linear growth with ratio a(n)/n ~ 1.73... - _M. F. Hasler_, Nov 04 2024
%H A192504 Reinhard Zumkeller, <a href="/A192504/b192504.txt">Table of n, a(n) for n = 1..1000</a>
%F A192504 A010051(a(n))*(1-A192490(a(n))) = 1.
%t A192504 a3309[nmax_] := a3309[nmax] = Module[{t = Range[2, nmax], k, r = {1}}, While[Length[t] > 0, k = First[t]; AppendTo[r, k]; t = Drop[t, {1, -1, k}]]; r];
%t A192504 ludicQ[n_, nmax_] /; 1 <= n <= nmax := MemberQ[a3309[nmax], n];
%t A192504 terms = 1000;
%t A192504 f[nmax_] := f[nmax] = Select[Range[nmax], ludicQ[#, nmax] && ! PrimeQ[#]&] // PadRight[#, terms]&;
%t A192504 f[nmax = terms];
%t A192504 f[nmax = 2 nmax];
%t A192504 While[f[nmax] != f[nmax/2], nmax = 2 nmax];
%t A192504 seq = f[nmax] (* _Jean-François Alcover_, Dec 10 2021, after _Ray CHandler_ in A003309 *)
%o A192504 (Haskell)
%o A192504 a192504 n = a192504_list !! (n-1)
%o A192504 a192504_list = filter ((== 0) . a010051) a003309_list
%o A192504 (PARI) A192504(maxn,bflag=0)={my(Vw=vector(maxn, x, x+1), Vl=Vec([1]), vwn=#Vw,i,vj,L=List());
%o A192504 while(vwn>0, i=Vw[1]; Vl=concat(Vl,[i]);
%o A192504       Vw=vector((vwn*(i-1))\i,x,Vw[(x*i+i-2)\(i-1)]); vwn=#Vw);
%o A192504 kill(Vw); vwn=#Vl;
%o A192504 for(j=1,vwn, vj=Vl[j]; if(!isprime(vj),listput(L,vj))); kill(Vw); vwn=#L;
%o A192504 if(bflag, for(i=1,vwn, print(i," ",L[i]))); if(!bflag, return(Vec(L)));
%o A192504 } \\ _Anatoly E. Voevudko_, Feb 28 2016
%Y A192504 Intersection of A018252 and A003309.
%Y A192504 Cf. A010051, A192490.
%Y A192504 Cf. A002808.
%K A192504 nonn
%O A192504 1,2
%A A192504 _Reinhard Zumkeller_, Jul 05 2011