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.

A038509 Composite numbers congruent to +-1 mod 6.

Original entry on oeis.org

25, 35, 49, 55, 65, 77, 85, 91, 95, 115, 119, 121, 125, 133, 143, 145, 155, 161, 169, 175, 185, 187, 203, 205, 209, 215, 217, 221, 235, 245, 247, 253, 259, 265, 275, 287, 289, 295, 299, 301, 305, 319, 323, 325, 329, 335, 341, 343, 355, 361, 365, 371, 377, 385
Offset: 1

Views

Author

Keywords

Comments

Or, composite numbers with smallest prime factor >= 5.
Or, nonprime numbers n such that binomial(n+3, 3) mod n == 1. - Hieronymus Fischer, Sep 30 2007
Note that the primes > 3 are congruent to +-1 mod 6.
This sequence differs from A067793 (composite n such that phi(n) > 2n/3) starting at 385. Numbers in this sequence but not in A067793 are 385, 455, 595, 665, 805, 1015, 1085, 1925, 2275, 2695, etc. See A069043. - R. J. Mathar, Jun 08 2008 and Zak Seidov, Nov 02 2011
Intersection of A002808 and A007310. - Reinhard Zumkeller, Jun 30 2012
The product (24/25) * (36/35) * (48/49) * (54/55) * (66/65) * (78/77) * (84/85) * (90/91) * ... * ((6*k)/a(n)) * ... = Pi^2/(6*sqrt(3)), where 6*k is the nearest number to a(n), with k in A067611 but not in A002822. (See A258414.) - Dimitris Valianatos, Mar 27 2017

Crossrefs

Cf. A171993 (nonprimes of the form 3*k+-1).
Cf. A069043, A067793 (composite n such that phi(n) > 2n/3).

Programs

  • Haskell
    a038509 n = a038509_list !! (n-1)
    a038509_list = [x | x <- a002808_list, gcd x 6 == 1]
    -- Reinhard Zumkeller, Aug 05 2014, Jun 30 2012
    
  • Maple
    A038509 := proc(n)
        option remember;
        if n = 1 then
            25;
        else
            for a from procname(n-1)+1 do
                if not isprime(a) and modp(a,6) in {1,5} then
                    return a;
                end if;
            end do:
        end if;
    end proc:
    seq(A038509(n),n=1..30) ; # R. J. Mathar, Feb 28 2020
  • Mathematica
    Select[Range[1000], FactorInteger[#][[1,1]] >= 5 && ! PrimeQ[#] &] (* Robert G. Wilson v, Dec 19 2009 *)
    With[{nn=400},Select[Rest[Complement[Range[nn],Prime[Range[ PrimePi[ nn]]]]], MemberQ[ {1,5},Mod[#,6]]&]] (* Harvey P. Dale, Feb 21 2013 *)
    Select[Range[400],CompositeQ[#]&&MemberQ[{1,5},Mod[#,6]]&] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, May 13 2019 *)
  • PARI
    is(n)=gcd(n,6)==1 && !isprime(n) && n>7 \\ Charles R Greathouse IV, Nov 20 2012

Formula

a(n) ~ 3n. - Charles R Greathouse IV, Nov 20 2012

Extensions

More terms from Robert G. Wilson v, Dec 19 2009
Entry revised by N. J. A. Sloane, Dec 31 2011, at the suggestion of Gary Detlefs