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: Nicolas Bělohoubek

Nicolas Bělohoubek's wiki page.

Nicolas Bělohoubek has authored 12 sequences. Here are the ten most recent ones:

A374233 Irregular triangle read by rows where row n lists the primes containing at least one digit not seen in any smaller prime in base n, for n >= 2.

Original entry on oeis.org

2, 2, 3, 2, 3, 5, 17, 2, 3, 5, 19, 2, 3, 5, 7, 29, 37, 2, 3, 5, 7, 11, 13, 2, 3, 5, 7, 11, 37, 53, 67, 2, 3, 5, 7, 11, 13, 17, 59, 83, 2, 3, 5, 7, 11, 19, 41, 61, 83, 101, 2, 3, 5, 7, 11, 17, 19, 31, 37, 43, 2, 3, 5, 7, 11, 13, 53, 73, 97, 109, 127, 149
Offset: 2

Author

Nicolas Bělohoubek, Jul 01 2024

Keywords

Examples

			Row n=4 is 2, 3, 5, 17, which is 2_4, 3_4, 11_4, 101_4.
First few rows:
       k=1  2  3   4   5   6   7   8
  n=2:  [2],
  n=3:  [2, 3],
  n=4:  [2, 3, 5, 17],
  n=5:  [2, 3, 5, 19],
  n=6:  [2, 3, 5,  7, 29, 37],
  n=7:  [2, 3, 5,  7, 11, 13],
  n=8:  [2, 3, 5,  7, 11, 37, 53, 67],
  ...
		

Crossrefs

Cf. A033274.

Programs

  • PARI
    isok(d, digs) = for (i=1, #d, if (!vecsearch(digs, d[i]), return(1)));
    row(n) = my(digs=List(), v=List()); forprime(p=2, , my(d = digits(p, n)); if (isok(d, Vec(digs)), listput(v, p); for (i=1, #d, listput(digs, d[i])); listsort(digs, 1); if (#digs == n, return(Vec(v))););); \\ Michel Marcus, Jul 02 2024
  • Python
    from sympy.ntheory import digits, nextprime
    def row(n):
        if n == 2: return [2]
        p, r, used = 2, [2], {2}
        while len(used) < n:
            while (ds:=set(digits(p:=nextprime(p), n)[1:])) <= used: pass
            r.append(p)
            used |= ds
        return r
    print([an for b in range(2, 13) for an in row(b)]) # Michael S. Branicky, Jul 01 2024
    

A372855 Number of ways two dihexes can be placed on an n-th regular hexagonal board.

Original entry on oeis.org

0, 33, 702, 3630, 11409, 27603, 56748, 104352, 176895, 281829, 427578, 623538, 880077, 1208535, 1621224, 2131428, 2753403, 3502377, 4394550, 5447094, 6678153, 8106843, 9753252, 11638440, 13784439, 16214253, 18951858, 22022202, 25451205, 29265759, 33493728
Offset: 1

Author

Nicolas Bělohoubek, May 15 2024

Keywords

Examples

			Regular hexagonal boards n = 1...4:
. ___
./   \
.\___/
.     ___
. ___/   \___
./   \___/   \
.\___/   \___/
./   \___/   \
.\___/   \___/
.    \___/
.         ___
.     ___/   \___
. ___/   \___/   \___
./   \___/   \___/   \
.\___/   \___/   \___/
./   \___/   \___/   \
.\___/   \___/   \___/
./   \___/   \___/   \
.\___/   \___/   \___/
.    \___/   \___/
.        \___/
.             ___
.         ___/   \___
.     ___/   \___/   \___
. ___/   \___/   \___/   \___
./   \___/   \___/   \___/   \
.\___/   \___/   \___/   \___/
./   \___/   \___/   \___/   \
.\___/   \___/   \___/   \___/
./   \___/   \___/   \___/   \
.\___/   \___/   \___/   \___/
./   \___/   \___/   \___/   \
.\___/   \___/   \___/   \___/
.    \___/   \___/   \___/
.        \___/   \___/
.            \___/
For n = 2 the a(2) = 33: (without grid)
. . . . . . . . . . . . . . . . . . .
.   x---x   .   x---x   .   x---x   .
.           .           .           .
. x---x   o . o   x---x . o   o   o .
.           .           .           .
.   o   o   .   o   o   .   x---x   .
. . . . . . . . . . . . . . . . . . .
.   x---x   .   x---x   .   x---x   .
.           .           .           .
. x   o   o . o   x   o . o   x   o .
.  \        .      \    .    /      .
.   x   o   .   o   x   .   x   o   .
. . . . . . . . . . . . . . . . . . .
.   x---x   .   o   o   .   o   x   .
.           .           .        \  .
. o   o   x . x---x   o . x---x   x .
.        /  .           .           .
.   o   x   .   x---x   .   o   o   .
. . . . . . . . . . . . . . . . . . .
.   o   o   .   o   o   .   o   o   .
.           .           .           .
. x---x   x . o   x---x . x   x---x .
.        /  .           .  \        .
.   o   x   .   x---x   .   x   o   .
. . . . . . . . . . . . . . . . . . .
.   x   o   .   x   o   .   o   x   .
.  /        .    \      .        \  .
. x   x---x . o   x   o . o   o   x .
.           .           .           .
.   o   o   .   x---x   .   x---x   .
. . . . . . . . . . . . . . . . . . .
.   x   o   .   o   x   .   x   x   .
.  /        .      /    .    \   \  .
. x   o   o . o   x   o . o   x   x .
.           .           .           .
.   x---x   .   x---x   .   o   o   .
. . . . . . . . . . . . . . . . . . .
.   x   o   .   x   o   .   o   x   .
.    \      .    \      .        \  .
. x   x   o . o   x   x . x   o   x .
.  \        .        /  .  \        .
.   x   o   .   o   x   .   x   o   .
. . . . . . . . . . . . . . . . . . .
.   o   x   .   x   x   .   o   x   .
.        \  .  /     \  .        \  .
. o   x   x . x   o   x . o   x   x .
.      \    .           .    /      .
.   o   x   .   o   o   .   x   o   .
. . . . . . . . . . . . . . . . . . .
.   o   o   .   o   x   .   o   o   .
.           .      /    .           .
. x   x   o . x   x   o . x   o   x .
.  \   \    .  \        .  \     /  .
.   x   x   .   x   o   .   x   x   .
. . . . . . . . . . . . . . . . . . .
.   x   o   .   x   x   .   x   o   .
.  /        .  /   /    .  /        .
. x   x   o . x   x   o . x   x   o .
.      \    .           .    /      .
.   o   x   .   o   o   .   x   o   .
. . . . . . . . . . . . . . . . . . .
.   x   o   .   o   x   .   o   o   .
.  /        .      /    .           .
. x   o   x . o   x   x . o   x   x .
.        /  .        /  .    /   /  .
.   o   x   .   o   x   .   x   x   .
. . . . . . . . . . . . . . . . . . .
		

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{5, -10, 10, -5, 1}, {0, 33, 702, 3630, 11409, 27603}, 50] (* Paolo Xausa, Aug 28 2024 *)

Formula

a(n) = (3/2)*(27*n^4 - 90*n^3 + 78*n^2 + 11*n - 24), for n > 1.
a(n) = 5*a(n - 1) - 10*a(n - 2) + 10*a(n - 3) - 5*a(n - 4) + a(n - 5) for n > 6.
G.f.: 3*x^2*(11 + 179*x + 150*x^2 - 17*x^3 + x^4)/(1 - x)^5.
E.g.f.: 36 - 3*x + 3*exp(x)*(27*x^4 + 72*x^3 - 3*x^2 + 26*x - 24)/2. - Stefano Spezia, Jun 04 2024

A370488 a(n) is the smallest integer k such that the average deviation of previous terms and k is an integer, where a(n) > a(n - 1) and a(1) = 1.

Original entry on oeis.org

1, 3, 11, 13, 57, 65, 95, 99, 124, 132, 159, 165, 246, 265, 335, 342, 353, 397, 406, 422, 426, 482, 876, 1018, 1383, 1641, 1689, 1731, 2376, 2433, 3149, 3202, 3294, 3822, 4068, 4077, 4192, 4274, 4554, 4575, 4712, 5368, 6283, 6303, 7997, 8226, 9815, 10696, 12273, 12325, 12764, 12868
Offset: 1

Author

Nicolas Bělohoubek, Feb 19 2024

Keywords

Programs

  • PARI
    avdev(v)={my(n=#v,sav=vecsum(v)/n);sum(k=1,n,abs(v[k]-sav))/n};
    a370488(nterms) = {my(v=vector(nterms)); v[1]=1; for (k=2, nterms, for (j=v[k-1]+1, oo, v[k]=j; if (denominator(avdev(v[1..k])) == 1, break))); v};
    a370488(52) \\ Hugo Pfoertner, Feb 20 2024

Formula

Conjecture: a(n)/n^3 tends to c, where 0.08 < c < 0.1.

A368062 Numbers k such that k = A257850(k) + A257297(k).

Original entry on oeis.org

0, 36, 655, 1258, 6208, 12508, 45715, 65455, 75385, 125008, 235297, 1250008, 2857144, 3214288, 4210528, 6545455, 6792453, 12500008, 34615386, 47058824, 87671233, 125000008, 654545455, 1250000008, 9529411765, 12500000008, 39130434783, 45714285715, 65454545455, 75384615385
Offset: 1

Author

Nicolas Bělohoubek, Dec 10 2023

Keywords

Examples

			     0 = 0*0   +   0*0;
    36 = 3*6   +   3*6;
   655 = 6*55  +  65*5;
  6208 = 6*208 + 620*8;
  ...
		

Crossrefs

Programs

  • Mathematica
    Select[Range[0,10^6], Part[digits=IntegerDigits[#],1]FromDigits[Drop[digits,1]] + FromDigits[Drop[digits,-1]]Part[digits,Length[digits]] == # &] (* Stefano Spezia, Dec 10 2023 *)
  • PARI
    \\ See links.
  • Python
    def ok(n):
        if n < 10: return n == 0
        s = str(n)
        return n == int(s[0])*int(s[1:]) + (n%10)*(n//10)
    print([k for k in range(10**6) if ok(k)]) # Michael S. Branicky, Dec 10 2023
    
  • Python
    # faster for generating initial segment of sequence
    from itertools import count, islice
    def agen(): # generator of terms
        yield 0
        for digits in count(2):
            for first in range(1, 10):
                base = first*10**(digits-1)
                for rest in range(10**(digits-1)):
                    n = base + rest
                    if first*rest + (n%10)*(n//10) == n:
                        yield n
                print("...", digits, first, time()-time0, alst)
    print(list(islice(agen(), 18))) # Michael S. Branicky, Dec 10 2023
    

Extensions

a(24)-a(30) from Michael S. Branicky, Dec 10 2023

A364133 Index k of A007814(A000127(k)) at record terms.

Original entry on oeis.org

1, 2, 3, 4, 5, 10, 1034, 1619, 19940, 151012, 185354, 937444, 17714660, 30594058, 53467077, 401540691, 1127208901, 34761279059, 1529978475530, 12645510928325
Offset: 0

Author

Nicolas Bělohoubek, Jul 10 2023

Keywords

Comments

For polynomial sequences like A000127 we can always find a recurrence formula, and with that you can show that all polynomial sequences mod m will be periodic. Terms of this sequence were found using A000127(k) mod 2^x, with a recursion formula, treating each k separately. This method limits the size of working quantities.
This sequence is related to the question: Is there a another power of 2 among Moser's circle numbers?

Crossrefs

A355148 Numbers that are the concatenation of two palindromes and that have exactly two palindromic factors, all with the same number of decimal digits.

Original entry on oeis.org

12, 14, 15, 16, 18, 21, 24, 25, 27, 28, 32, 35, 36, 42, 45, 48, 49, 54, 56, 63, 64, 72, 81, 3388, 7744, 101787, 101808, 111888, 151848, 212565, 212898, 232656, 313464, 313575, 353868, 383595, 383838, 414585, 434676, 454545, 505808, 515595, 525252, 555888
Offset: 1

Author

Nicolas Bělohoubek, Jun 21 2022

Keywords

Comments

All numbers of form (4/45)*(9*100^d - 29*10^d + 20) are terms (see example).
Also numbers of form (7/18)*(100^d - 13*10^d + 12) and are also terms (d>1) and of form (4/45)*(4*100^d - 19*10^d + 15) (d>1).
From Chai Wah Wu, Aug 23 2022: (Start)
Terms with 2 decompositions:
12 = 3*4 = 2*6
16 = 4*4 = 2*8
18 = 2*9 = 3*6
24 = 4*6 = 3*8
36 = 4*9 = 6*6
153535351846464648 = 189828981*808808808 = 172727271*888888888
182919281817080718 = 303303303*603090306 = 201030102*909909909
183838381816161618 = 303060303*606606606 = 202040202*909909909
185676581814323418 = 306090603*606606606 = 204060402*909909909
192919291807080708 = 303303303*636060636 = 212020212*909909909
193838391806161608 = 303303303*639090936 = 213030312*909909909
283919382716080617 = 312030213*909909909 = 303303303*936090639
293656392403040304 = 461262164*636636636 = 363363363*808161808
293919392706080607 = 323020323*909909909 = 303303303*969060969
365838563634161436 = 603090306*606606606 = 402060204*909909909
385838583614161416 = 606606606*636060636 = 424040424*909909909
387676783612323216 = 606606606*639090936 = 426060624*909909909
567838765432161234 = 624060426*909909909 = 606606606*936090639
587838785412161214 = 646040646*909909909 = 606606606*969060969
Conjecture: these are an infinite number of such terms.
The following term has 3 decompositions:
113131311886868688 = 279747972*404404404 = 254545452*444444444 = 252252252*448484844.
(End)
A subsequence of this sequence is {s(k)} where s(k) = (202/10989)*t(k)*u(k), t(k) = 10^(6*k + 3) - 1 and u(k) = 2099*10^(6*k + 1) + 988. s(k) can be decomposed in 2 different ways: the first is (202/333)*t(k) and (1/33)*u(k); the second is (101/111)*t(k) and (2/99)*u(k). And since {s(k)} is an infinite sequence, its existence proves Chai Wah Wu's conjecture to be true. - Nicolas Bělohoubek, May 20 2024

Examples

			42 is the concatenation of 4 and 2, and is also 6*7 (all 1 digit).
3388 is the concatenation of 33 and 88, and is also 44*77 (all 2 digits).
414585 is the concatenation of 414 and 585, and is also 555*747 (all 3 digits).
131080 = 232*565 is not a term since 080 begins with 0 and hence is not a three-digit palindromic number.
79974224 = 8998*8888, 7999742224 = 89998*88888, 799997422224 = 899998*888888 (see comments).
		

Programs

  • Python
    from sympy import divisors
    from itertools import count, islice, product
    def ispal(s): return s == s[::-1]
    def pals(d, start0=False): # generates palindromic strings with d digits
        digits = "0123456789"
        if d == 1: yield from "0"*int(start0) + "123456789"; return
        for p in product(digits, repeat=d//2):
            if not start0 and p[0] == "0": continue
            left = "".join(p); right = left[::-1]
            for mid in [[""], digits][d%2]: yield left + mid + right
    def agen(): # generator of terms
        for d in count(1):
            found = set()
            for p1 in pals(d):
                for p2 in pals(d):
                    p = int(p1)*int(p2)
                    s = str(p)
                    if len(s) != 2*d: continue
                    if ispal(s[:d]) and s[d] != "0" and ispal(s[d:]):
                        found.add(p)
            yield from sorted(found)
    print(list(islice(agen(), 51))) # Michael S. Branicky, Jun 21 2022

A352844 Smallest k > 1 such that sopfr(k) - tau(k) = n, or -1 if no such k exists.

Original entry on oeis.org

2, 3, 8, 5, 15, 7, 21, 25, 35, 11, 33, 13, 39, 117, 65, 17, 51, 19, 57, 121, 95, 23, 69, 169, 115, 483, 161, 29, 87, 31, 93, 279, 155, 651, 217, 37, 111, 333, 185, 41, 123, 43, 129, 387, 215, 47, 141, 423, 235, 954, 318, 53, 159, 477, 265, 841, 354, 59, 177, 61
Offset: 0

Author

Nicolas Bělohoubek, Apr 05 2022

Keywords

Comments

Conjecture: There is no -1 in this sequence.

Crossrefs

Programs

  • PARI
    f(m) = my(fp=factor(m)); sum(k=1, #fp~, fp[k,1]*fp[k,2]) - numdiv(fp);
    a(n) = my(k=2); while(f(k) != n, k++); k; \\ Michel Marcus, Apr 06 2022

Formula

It appears that the sequence satisfies these rules, for large m:
Rule 1: a(prime(m+1) - 2) = prime(m+1)
Rule 2: a(prime(m+1) - 1) = 3*prime(m+1)
Rule 3: a(prime(m+1) + 1) = 5*prime(m+1)
Rule 4: a(prime(m+1) - 3) = 6*prime(m+1)
Rule 5: a(prime(m+1) + 3) = 7*prime(m+1)
Rule 6: a(prime(m+1)) = 9*prime(m+1)
Rule 7: a(prime(m+1) - 7) = 11*prime(m+1)
Rule 8: a(prime(m+1) + 7) = 12*prime(m+1)
Rule 9: a(prime(m+1) + 9) = 13*prime(m+1)
...
Choose the first rule that applies.

A352742 a(n) is the smallest number > 1 that is not divisible by 10 but is divisible by the n-th power of the sum of its digits.

Original entry on oeis.org

2, 81, 512, 2401, 11101212, 34012224, 612220032, 20047612231936, 3904305912313344, 7800803212802061312, 1025300207121086650406, 213780015477322248820322, 14076019706120526112710656, 2670419511272061205254504361, 2759031540715333904109053133443, 10530400808911150200350000010411
Offset: 1

Author

Nicolas Bělohoubek, Mar 31 2022

Keywords

Comments

a(n+1) >= a(n).
When A072408(n) is not multiple of 10 then a(n) <= A072408(n).
a(n) = m * k^n where m is a positive integer and k is the sum of digits of a(n).
Conjecture: No term is a multiple of 5.
a(28) = 265^28, disproving the above conjecture. - Charles R Greathouse IV, Apr 02 2022

Examples

			For n=5, 11101212 is not divisible by 10 but is divisible by the 5th power of the sum of its digits, that being (1+1+1+0+1+2+1+2)^5 = 9^5. There is no smaller such number.
		

Crossrefs

Cf. A072408.

Extensions

a(7)-a(8) confirmed by Jon E. Schoenfield, Mar 31 2022
a(9)-a(16) from Charles R Greathouse IV, Apr 02 2022

A348166 a(n) = abs(A020338(n)-A338754(n)).

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 0, 90, 0, 90, 180, 270, 360, 450, 540, 630, 720, 180, 90, 0, 90, 180, 270, 360, 450, 540, 630, 270, 180, 90, 0, 90, 180, 270, 360, 450, 540, 360, 270, 180, 90, 0, 90, 180, 270, 360, 450, 450, 360, 270, 180, 90, 0, 90, 180, 270, 360, 540, 450, 360, 270, 180, 90, 0, 90, 180, 270, 630, 540, 450, 360, 270, 180, 90
Offset: 1

Author

Nicolas Bělohoubek, Oct 04 2021

Keywords

Comments

All terms are multiples of 90.

Examples

			a(1) = abs(11-11) = 0
a(15) = abs(1515-1155) = 360
a(1965) = abs(19651965-11996655) = 7655310
		

Crossrefs

Programs

Formula

a(A010785(n)) = 0

Extensions

Corrected by Charles R Greathouse IV, Oct 04 2021

A344679 Number of 2-matchings of the n-th centered square grid graph.

Original entry on oeis.org

0, 0, 86, 544, 1854, 4688, 9910, 18576, 31934, 51424, 78678, 115520, 163966, 226224, 304694, 401968, 520830, 664256, 835414, 1037664, 1274558, 1549840, 1867446, 2231504, 2646334, 3116448, 3646550, 4241536, 4906494, 5646704, 6467638, 7374960, 8374526, 9472384, 10674774
Offset: 1

Author

Nicolas Bělohoubek, Aug 17 2021

Keywords

Comments

Number of ways two dominoes can be placed on an "other" Aztec Diamonds chessboard.

Examples

			For n=1 there is no way to place 2 dominoes in the centered square grid graphs, because they don't have enough space to be placed, so a(1)=0.
For n=2 there is no way to place 2 dominoes in the centered square grid graphs, because the first domino will cover the center square every time, so a(2)=0.
		

Crossrefs

Formula

a(n) = 2*(n-2)*(4n^3-8n^2+n+4) for n > 1.
From Stefano Spezia, Aug 17 2021: (Start)
G.f.: 2*x^3*(43 + 57*x - 3*x^2 - x^3)/(1 - x)^5.
a(n) = 5*a(n-1) - 10*a(n-2) + 10*a(n-3) - 5*a(n-4) + a(n-5) for n > 6. (End)