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.

User: Randy L. Ekl

Randy L. Ekl's wiki page.

Randy L. Ekl has authored 56 sequences. Here are the ten most recent ones:

A378949 Numbers with monotonically increasing digits, increasing by only 0 or 1.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 12, 22, 23, 33, 34, 44, 45, 55, 56, 66, 67, 77, 78, 88, 89, 99, 111, 112, 122, 123, 222, 223, 233, 234, 333, 334, 344, 345, 444, 445, 455, 456, 555, 556, 566, 567, 666, 667, 677, 678, 777, 778, 788, 789, 888, 889, 899, 999
Offset: 1

Author

Randy L. Ekl, Dec 18 2024

Keywords

Examples

			33 is a term since the digits are monotonically increasing and their difference is 0.
34 is also a term since the digits are monotonically increasing and their difference is 1.
35 is not a term since the difference in consecutive digits is not 0 or 1.
32 is not a term since the digits are decreasing.
		

Crossrefs

Programs

  • Maple
    extend:= proc(k) local m,d;
      m:= 10^ilog10(k);
      d:= floor(k/m);
      if d = 1 then 10*m+k else (d-1)*10*m+k, d*10*m+k fi
    end proc:
    R:= $1..9:
    A:= [R]:
    for i from 2 to 5 do
      A:= map(extend,A);
      R:= R, op(sort(A));
    od:
    R; # Robert Israel, Jan 18 2025
  • Mathematica
    Select[Range[1000],SubsetQ[{0, 1}, Union@ Differences@ IntegerDigits[#]] &] (* James C. McMahon, Dec 21 2024 *)
  • Python
    from itertools import count, islice
    def bgen(last, d):
        if d == 0: yield tuple(); return
        t = (1, 9) if last == None else (last, min(last+1, 9))
        for i in range(t[0], t[1]+1): yield from ((i, )+r for r in bgen(i, d-1))
    def agen(): # generator of terms
        yield from (int("".join(map(str, i))) for d in count(1) for i in bgen(None, d))
    print(list(islice(agen(), 62))) # Michael S. Branicky, Dec 18 2024

Extensions

Offset corrected by James C. McMahon, Dec 21 2024

A378775 Prime numbers with monotonically decreasing digits, differing by at most 1.

Original entry on oeis.org

2, 3, 5, 7, 11, 43, 211, 433, 443, 877, 887, 2111, 2221, 3221, 5443, 8887, 9887, 22111, 33211, 43321, 54443, 65543, 76543, 98887, 99877, 322111, 332221, 443221, 444443, 766543, 888887, 988877, 2221111, 3221111, 3222211, 3222221, 3333221, 4322221, 4433333, 4443221
Offset: 1

Author

Randy L. Ekl, Dec 06 2024

Keywords

Examples

			211 is a term since 211 is a prime number, the digits of 211 are monotonically decreasing, and the difference between consecutive digits is at most 1.
		

Crossrefs

Primes in A378808.

Programs

  • Maple
    extend:= proc(x) local d,s,i;
      d:= ilog10(x);
      s:= floor(x/10^d);
      seq(10^(d+1)*i+x, i=s .. min(9,s+1))
    end proc:
    R:= 2,3,5,7: count:= 4:
    M:= [1,3,7,9];
    for d from 2 while count < 100 do
      M:= map(extend,M):
      S:= sort(select(isprime,M));
      count:= count+nops(S);
      R:= R,op(S);
    od:
    R; # Robert Israel, Feb 09 2025
  • Mathematica
    Select[Prime[Range[312218]],ContainsOnly[Drop[IntegerDigits[#],-1]-Rest[IntegerDigits[#]],{0,1}]&] (* James C. McMahon, Dec 21 2024 *)
  • PARI
    isok(p) = if (isprime(p), my(d=digits(p), dd = vector(#d-1, k, d[k+1]-d[k])); (#dd==0) || ((vecmin(dd)>=-1) && (vecmax(dd)<=0))); \\ Michel Marcus, Dec 09 2024

A378774 Prime numbers with monotonically increasing digits, increasing by only 0 or 1.

Original entry on oeis.org

2, 3, 5, 7, 11, 23, 67, 89, 223, 233, 677, 1123, 1223, 2333, 4567, 7789, 8999, 23333, 45667, 45677, 55667, 67777, 67789, 77899, 78889, 112223, 344567, 445567, 555677, 556789, 566677, 567899, 666667, 788999, 1112333, 2222333, 3445567, 3445667, 3455567, 3456667, 4455667, 4456789, 4556777
Offset: 1

Author

Randy L. Ekl, Dec 06 2024

Keywords

Examples

			223 is a term since the digits of 223 are monotonically increasing, consecutive digits differ by at most 1, and 223 is prime.
		

Crossrefs

Programs

  • Maple
    extend:= proc(x) local d,s,i;
      d:= ilog10(x);
      s:= floor(x/10^d);
      seq(10^(d+1)*i+x, i=max(1,s-1) .. s)
    end proc:
    R:= 2,3,5,7: count:= 4:
    M:= [1,3,7,9];
    for d from 2 while count < 100 do
      M:= map(extend,M):
      S:= sort(select(isprime,M));
      count:= count+nops(S);
      R:= R,op(S);
    od:
    R; # Robert Israel, Feb 09 2025
  • Mathematica
    Select[Prime[Range[319629]], ContainsOnly[Rest[IntegerDigits[#]]-Drop[IntegerDigits[#], -1], {0, 1}]&] (* James C. McMahon, Dec 21 2024 *)
  • PARI
    isok(p) = if (isprime(p), my(d=digits(p), dd = vector(#d-1, k, d[k+1]-d[k])); (#dd==0) || ((vecmin(dd)>=0) && (vecmax(dd)<=1))); \\ Michel Marcus, Dec 09 2024

A378808 Numbers with monotonically decreasing digits, decreasing by only 0 or 1.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 21, 22, 32, 33, 43, 44, 54, 55, 65, 66, 76, 77, 87, 88, 98, 99, 100, 110, 111, 210, 211, 221, 222, 321, 322, 332, 333, 432, 433, 443, 444, 543, 544, 554, 555, 654, 655, 665, 666, 765, 766, 776, 777, 876, 877, 887, 888, 987, 988, 998, 999
Offset: 1

Author

Randy L. Ekl, Dec 07 2024

Keywords

Examples

			32 is a term since it has monotonically decreasing digits whose difference is at most 1.
33 is a term since it also has monotonically decreasing digits whose difference is at most 1.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[999],SubsetQ[{0,1},-Differences[IntegerDigits[#]]] &] (* Stefano Spezia, Dec 08 2024 *)
  • Python
    from itertools import count, islice
    def bgen(last, d):
        if d == 0: yield tuple(); return
        t = (1, 9) if last == None else (max(0, last-1), last)
        for i in range(t[0], t[1]+1): yield from ((i,)+r for r in bgen(i, d-1))
    def agen(): # generator of terms
        yield from (int("".join(map(str, i))) for d in count(1) for i in bgen(None, d))
    print(list(islice(agen(), 62))) # Michael S. Branicky, Dec 08 2024

A305579 Square array read by antidiagonals upwards in which row k has k as its first term and each subsequent term is the least possible value such that the sum of any 2 or more terms does not equal a prime.

Original entry on oeis.org

1, 2, 3, 3, 4, 5, 4, 5, 6, 87, 5, 5, 7, 8, 87, 6, 7, 11, 83, 10, 1151, 7, 8, 9, 29, 235, 12, 5371, 8, 8, 10, 79, 215, 395, 14, 199276, 9, 10, 13, 12, 131, 511, 5275, 16, 32281747, 10, 11, 12, 37, 14, 196, 8729, 76128, 18, 16946784207, 11, 11, 13, 14, 67, 16, 3983, 20526, 9782734, 20
Offset: 1

Author

Randy L. Ekl and Robert G. Wilson v, Jun 05 2018

Keywords

Comments

Rows which appear to have consecutive even numbers are for k = 2, 6, 8, 14, 18, 20, 26, 36, 44, 48, 50, 54,56, 68, 74, 78, 86, 96, 114, ..., .
Conjecture: these row terms are a proper subset of A005843.

Examples

			Row 1 is A133660 and is a good illustration of the definition.
Array begins:
============================================================================
k\n|  1   2   3   4    5     6      7       8         9           10
---|------------------------------------------------------------------------
1  |  1,  3,  5, 87, 113, 1151,  5371, 199276, 32281747, 16946784207, ..., ;
2  |  2,  4,  6,  8,  10,   12,    14,     16,       18,          20, ..., ;
3  |  3,  5,  7, 83, 235,  395,  5275,  76128,  9782734, ..., ;
4  |  4,  5, 11, 29, 215,  511,  8729,  20526,  9745499, ..., ;
5  |  5,  7,  9, 79, 131,  196,  3983,  16380,   270270, ..., ;
6  |  6,  8, 10, 12,  14,   16,    18,     20,       22,          24, ..., ;
7  |  7,  8, 13, 37,  67, 1087,  5128, 137886,  6353767, ..., ;
8  |  8, 10, 12, 14,  16,   18,    20,     22,       24,          26, ..., ;
9  |  9, 11, 13, 71, 112,  281,  1952, 147630,  1729159, ..., ;
10 | 10, 11, 14, 25,  94,  756,  2394,  28480,  1466566, ..., ;
11 | 11, 13, 14, 25, 109,  559,  2719,  57985,  2589731, ..., ;
12 | 12, 13, 14, 37,  79,  673,  2929, 113256,  9708060, ..., ;
13 | 13, 14, 19, 31,  97,  882,  2028, 161340,  3635970, ..., ;
14 | 14, 16, 18, 20,  22,   24,    26,     28,       30,          32, ..., ;
15 | 15, 17, 18, 31, 137,  502,  7983, 599346, 27105801, ..., ;
16 | 16, 17, 18, 47, 107,  395,  6480,  91140,   467730, ..., ;
17 | 17, 18, 21, 31,  77,  637,  3609,  77910,   652680, ..., ;
18 | 18, 20, 22, 24,  26,   28,    30,     32,       34,          36, ..., ;
19 | 19, 20, 25, 30,  61,  235,  2965,   4415,   394170,     5769540, ..., ;
20 | 20, 22, 24, 26,  28,   30,    32,     34,       36,          38, ..., ;
21 | 21, 23, 25, 47,  73,  797, 20419, 235665,      ..., ;
22 | 22, 23, 27, 42,  69,  462,   672,    783,    71652,      935298, ..., ;
23 | 23, 25, 26, 37,  73, 1555,  4219, 196260,  3698520, ..., ;
24 | 24, 25, 26, 31, 193,  504,  3756,  91831,  7703843, ..., ;
25 | 25, 26, 29, 31,  39,  750,  4350,  85830,   661350, ..., ;
26 | 26, 28, 30, 32,  34,   36,    38,     40,       42,          44, ..., ;
27 | 27, 28, 29, 35, 232,  888,  5670, 134400,  4058376, ..., ;
28 | 28, 29, 34, 53,  59, 1045,  3696, 249240,  9475589, ..., ;
29 | 29, 31, 33, 55,  57,  674,  6581, 126272,  2549747, ..., ;
30 | 30, 32, 33, 52,  60,   63,    90,    120,      150,         180, ..., ;
31 | 31, 32, 33, 54,  90,  714,  9450, 188850,  2598573, ..., ;
32 | 32, 33, 37, 45, 138,  597,  2703, 101055,  2754885, ..., ;
33 | 33, 35, 37, 47, 133,  555,  4155, 332885,  3090195, ..., ;
34 | 34, 35, 41, 43,  77,  594,  2940,  35700,  2323246, ..., ;
35 | 35, 37, 39, 43, 210, 1061, 10125, 372955, 30373014, ..., ;
36 | 36, 38, 40, 42,  44,   46,    48,     50,       52,          54, ..., ;
37 | 37, 38, 39, 47,  48,  631,  8862, 124851,  4972506, ..., ;
..., etc.
		

Crossrefs

Cf. A005843, A052349, A133660, A133661, first column: A000027.

Programs

  • Mathematica
    (* first do *) Needs["Combinatorica`"] (* then *) lst = {k}; g[k_] := Block[{j = 1, l = 2^Length@lst}, While[j < l && !PrimeQ[Plus @@ NthSubset[j, lst] + k], j++ ]; If[j == l, False, True]]; f[n_] := Block[{k = lst[[-1]] + 1}, While[PrimeQ@k || g[k] == True, k++; k++ ]; AppendTo[lst, k]; k]; Do[ Print@ f@ n, {n, 10}] (* Robert G. Wilson v, Jun 05 2018 *)

A280636 Semiprime numbers whose digit string can be partitioned into three parts such that the product of the first two parts equals the third part.

Original entry on oeis.org

111, 122, 133, 155, 166, 177, 326, 339, 515, 717, 818, 2918, 3721, 5315, 6742, 7214, 7642, 9327, 9763, 11111, 11333, 11555, 12929, 13333, 13535, 13565, 13791, 13939, 14114, 14141, 14242, 14545, 15115, 15151, 15353, 15454, 15757, 16161, 16565
Offset: 1

Author

Randy L. Ekl, Jan 06 2017

Keywords

Comments

Could be called semiprime area numbers. If the first set of digits of the number is considered the length, the second set of digits of the number is considered the width, and the final set of digits of the number is considered the area, then length * width = area.

Examples

			2918 is semiprime (2*1459) and an area number (2*9 = 18).
6742 is semiprime (2*3371) and an area number (6*7 = 42).
Leading zeros are not allowed.
		

Crossrefs

Formula

A001358 INTERSECT A280635.

A280635 Numbers whose digit string can be partitioned into three nonempty parts such that the product of the first two parts equals the third part.

Original entry on oeis.org

111, 122, 133, 144, 155, 166, 177, 188, 199, 212, 224, 236, 248, 313, 326, 339, 414, 428, 515, 616, 717, 818, 919, 2510, 2612, 2714, 2816, 2918, 3412, 3515, 3618, 3721, 3824, 3927, 4312, 4416, 4520, 4624, 4728, 4832, 4936, 5210, 5315, 5420, 5525, 5630, 5735
Offset: 1

Author

Randy L. Ekl, Jan 06 2017

Keywords

Comments

Could be called "area numbers" since if the first set of digits is the length, and the second set of digits is the width, then the last set of digits is the area, with length * width = area.

Examples

			236 is in the sequence since 2*3=6. 3515 is in the sequence since 3*5=15. Leading zeros are not allowed, thus 2036 (2*03=6) is not included.
		

Crossrefs

Programs

  • Maple
    read("transforms") : # implements digcatL
    isA280635 := proc(n)
        local dgs,spl1,spl2,dgs1,dgs2,dgs3;
        dgs := convert(n,base,10) ;
        if nops(dgs) >= 3 then
            for spl1 from 1 to nops(dgs)-2 do
            for spl2 from spl1+1 to nops(dgs)-1 do
                if op(-1,dgs) <> 0 and op(spl1,dgs) <> 0 and op(spl2,dgs) <> 0 then
                    dgs1 := ListTools[Reverse]([op(spl2+1..nops(dgs),dgs)]) ;
                    dgs2 := ListTools[Reverse]([op(spl1+1..spl2,dgs)]) ;
                    dgs3 := ListTools[Reverse]([op(1..spl1,dgs)]) ;
                    if digcatL(dgs1)*digcatL(dgs2) = digcatL(dgs3) then
                        return true;
                    end if
                end if;
            end do:
            end do:
            false ;
        else
            false;
        end if;
    end proc:
    for n from 100 do
        if isA280635(n) then
            printf("%d,\n",n) ;
        end if;
    end do: # R. J. Mathar, Jan 10 2017
  • Mathematica
    With[{nn = 1}, Union@ Flatten@ Table[FromDigits@ Flatten@ Map[IntegerDigits, {n, k, n k}], {n, 10^nn - 1}, {k, 10^nn - 1}]] (* Michael De Vlieger, Jan 07 2017 *)

A280406 Odd semiprimes that can be represented as 2p+3q, where p and q are primes, in an increasing number of ways.

Original entry on oeis.org

15, 25, 55, 91, 115, 187, 215, 235, 335, 403, 415, 515, 535, 655, 695, 835, 955, 1115, 1195, 1393, 1405, 1555, 1895, 1963, 2095, 2155, 2335, 2395, 2615, 2815, 2995, 3235, 3295, 3635, 3935, 3985, 4295, 4415, 4435, 4735, 4855, 4915, 5095, 5515, 5815, 6415, 6835, 7135, 7195, 7415, 8035, 8135
Offset: 1

Author

Randy L. Ekl, Jan 02 2017

Keywords

Comments

It is conjectured that all terms of this sequence above 1963 are divisible by 5. Initial search to 1000000.

Crossrefs

A280405 Odd semiprimes that cannot be represented as 2p+3q, where p and q are primes.

Original entry on oeis.org

9, 33, 51, 69, 87, 111, 123, 141, 159, 177, 201, 213, 237, 249, 267, 291, 303, 321, 339, 381, 393, 411, 447, 471, 489, 501, 519, 537, 573, 591, 633, 669, 681, 699, 717, 753, 771, 789, 807, 831, 843, 879, 921, 933, 951, 993
Offset: 1

Author

Randy L. Ekl, Jan 02 2017

Keywords

Examples

			33 = 3*11 is a semiprime, and cannot be represented as twice a prime plus three times a prime.  21=3*7 is a semiprime which CAN be represented in that form, i.e. 2*3+3*5, and thus is not in this sequence.
		

Crossrefs

Cf. A046315 (odd semiprimes)
Cf. A280389 (odd semiprimes which can be represented as 2p+3q, where p and q are prime)

Programs

  • Maple
    N:= 10^4: # to get all terms <= N
    Primes:= select(isprime,[2,seq(i,i=3..N/2,2)]):
    Cands:= {seq(i,i=1..N,2)} minus {seq(seq(2*p+3*q,p=Primes),q=Primes)}:
    sort(convert(select(numtheory:-bigomega=2, Cands),list)); # Robert Israel, Jan 09 2017

A280389 Odd semiprimes that can be represented as 2p+3q, where p and q are primes.

Original entry on oeis.org

15, 21, 25, 35, 39, 49, 55, 57, 65, 77, 85, 91, 93, 95, 115, 119, 121, 129, 133, 143, 145, 155, 161, 169, 183, 185, 187, 203, 205, 209, 215, 217, 219, 221, 235, 247, 253, 259, 265, 287, 289, 295, 299, 301, 305, 309, 319, 323, 327, 329, 335, 341, 355, 361, 365, 371, 377, 391, 395, 403
Offset: 1

Author

Randy L. Ekl, Jan 02 2017

Keywords

Crossrefs

Cf. A046315 (odd semiprimes).
Cf. A280405 (odd semiprimes which can NOT be represented as 2p+3q, where p and q are prime).

Programs

  • Maple
    N:= 10^3: # to get all terms <= N
    Primes:= select(isprime, [2, seq(i, i=3..N/2, 2)]):
    Cands:= select(t -> t::odd and t <= N, {seq(seq(2*p+3*q, p=Primes), q=Primes)}):
    sort(convert(select(numtheory:-bigomega=2, Cands), list)); # Robert Israel, Jan 09 2017