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.

Original entry on oeis.org

1, 25, 77, 91, 115, 119, 121, 143, 161, 175, 209, 221, 235, 247, 265, 287, 301, 329, 341, 361, 377, 407, 415, 437, 445, 475, 481, 493, 497, 517, 527, 535, 553, 565, 581, 595, 625, 667, 685, 697, 703, 707, 749, 775, 791, 803, 805, 835, 841, 851, 865, 893, 913
Offset: 1

Views

Author

Reinhard Zumkeller, Jul 05 2011

Keywords

Comments

The sequence appears to have linear growth with ratio a(n)/n ~ 1.73... - M. F. Hasler, Nov 04 2024

Crossrefs

Intersection of A018252 and A003309.
Cf. A002808.

Programs

  • Haskell
    a192504 n = a192504_list !! (n-1)
    a192504_list = filter ((== 0) . a010051) a003309_list
    
  • Mathematica
    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];
    ludicQ[n_, nmax_] /; 1 <= n <= nmax := MemberQ[a3309[nmax], n];
    terms = 1000;
    f[nmax_] := f[nmax] = Select[Range[nmax], ludicQ[#, nmax] && ! PrimeQ[#]&] // PadRight[#, terms]&;
    f[nmax = terms];
    f[nmax = 2 nmax];
    While[f[nmax] != f[nmax/2], nmax = 2 nmax];
    seq = f[nmax] (* Jean-François Alcover, Dec 10 2021, after Ray CHandler in A003309 *)
  • PARI
    A192504(maxn,bflag=0)={my(Vw=vector(maxn, x, x+1), Vl=Vec([1]), vwn=#Vw,i,vj,L=List());
    while(vwn>0, i=Vw[1]; Vl=concat(Vl,[i]);
          Vw=vector((vwn*(i-1))\i,x,Vw[(x*i+i-2)\(i-1)]); vwn=#Vw);
    kill(Vw); vwn=#Vl;
    for(j=1,vwn, vj=Vl[j]; if(!isprime(vj),listput(L,vj))); kill(Vw); vwn=#L;
    if(bflag, for(i=1,vwn, print(i," ",L[i]))); if(!bflag, return(Vec(L)));
    } \\ Anatoly E. Voevudko, Feb 28 2016

Formula

A010051(a(n))*(1-A192490(a(n))) = 1.