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.

Showing 1-3 of 3 results.

A158725 Non-repdigit composite numbers not divisible by 2, 3, 5 or 11.

Original entry on oeis.org

49, 91, 119, 133, 161, 169, 203, 217, 221, 247, 259, 287, 289, 299, 301, 323, 329, 343, 361, 371, 377, 391, 403, 413, 427, 437, 469, 481, 493, 497, 511, 527, 529, 533, 551, 553, 559, 581, 589, 611, 623, 629, 637, 667, 679, 689, 697, 703, 707, 713, 721, 731
Offset: 1

Views

Author

Lekraj Beedassy, Mar 24 2009

Keywords

Comments

Non-repdigit composite numbers ending in 1, 3, 7 or 9, with digital root not a multiple of 3 and whose alternate digit sums do not differ by a multiple of 11.
The "compositeness" of larger entries of the sequence is not obvious right away or deducible by mere inspection, and hence these terms readily lend themselves to be (erroneously) suspected as primes to the casual glance.
This differs from the corresponding sequence without the repunit condition starting at a(1351) = 11123 rather than 11111. - Charles R Greathouse IV, Sep 08 2012

Crossrefs

Programs

Formula

a(n) ~ kn with k = 33/8. - Charles R Greathouse IV, Sep 08 2012

Extensions

Corrected and extended by Ray Chandler, Mar 27 2009

A216167 Composite numbers which yield a prime whenever a 5 is inserted anywhere in them, excluding at the end.

Original entry on oeis.org

9, 21, 57, 63, 69, 77, 87, 93, 153, 231, 381, 407, 413, 417, 501, 531, 581, 651, 669, 741, 749, 783, 791, 987, 1241, 1551, 1797, 1971, 2189, 2981, 3381, 3419, 3591, 3951, 4083, 4503, 4833, 4949, 4959, 5049, 5117, 5201, 5229, 5243, 5529, 5547, 5603, 5691, 5697
Offset: 1

Views

Author

Paolo P. Lava, Sep 03 2012

Keywords

Examples

			4083 is not prime but 40853, 40583, 45083 and 54083 are all primes.
		

Crossrefs

Programs

  • Magma
    [n: n in [1..6000] | not IsPrime(n) and forall{m: t in [1..#Intseq(n)] | IsPrime(m) where m is (Floor(n/10^t)*10+5)*10^t+n mod 10^t}]; // Bruno Berselli, Sep 03 2012
    
  • Maple
    with(numtheory);
    A216167:=proc(q,x)
    local a,b,c,i,n,ok;
    for n from 1 to q do
    if not isprime(n) then
      a:=n; b:=0; while a>0 do b:=b+1; a:=trunc(a/10); od; a:=n; ok:=1;
      for i from 1 to b do c:=a+9*10^i*trunc(a/10^i)+10^i*x;
        if not isprime(c) then ok:=0; break; fi;
      od;
      if ok=1 then print(n); fi;
    fi;
    od; end:
    A216167(1000,5);
  • Mathematica
    Select[Range[6000],CompositeQ[#]&&AllTrue[FromDigits/@Table[Insert[IntegerDigits[#],5,p],{p,IntegerLength[#]}],PrimeQ]&] (* Harvey P. Dale, Oct 02 2022 *)
  • Python
    from sympy import isprime
    def ok(n):
        if n < 2 or n%10 not in {1, 3, 7, 9} or isprime(n): return False
        s = str(n)
        return all(isprime(int(s[:i] + '5' + s[i:])) for i in range(len(s)))
    print(list(filter(ok, range(5698)))) # Michael S. Branicky, Sep 21 2021

A100490 Odd numbers ending in {1,3,7,9} that are not primes.

Original entry on oeis.org

1, 9, 21, 27, 33, 39, 49, 51, 57, 63, 69, 77, 81, 87, 91, 93, 99, 111, 117, 119, 121, 123, 129, 133, 141, 143, 147, 153, 159, 161, 169, 171, 177, 183, 187, 189, 201, 203, 207, 209, 213, 217, 219, 221, 231, 237, 243, 247, 249, 253, 259, 261, 267, 273, 279, 287
Offset: 0

Views

Author

Roger L. Bagula, Nov 22 2004

Keywords

Comments

Essentially the same as A053795. [From R. J. Mathar, Sep 02 2008]

Programs

  • Mathematica
    Select[Range[1,311,2],MemberQ[{1,3,7,9},Mod[#,10]]&&!PrimeQ[#]&] (* Harvey P. Dale, Sep 01 2024 *)
Showing 1-3 of 3 results.