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: Karl W. Heuer

Karl W. Heuer's wiki page.

Karl W. Heuer has authored 11 sequences. Here are the ten most recent ones:

A385861 Number of n X n yesnograms that can be solved uniquely.

Original entry on oeis.org

1, 2, 14, 368, 49578, 24177516, 46985524156
Offset: 0

Author

Karl W. Heuer, Aug 06 2025

Keywords

Comments

A nonogram provides row and column clues indicating runs of black pixels, treating white as blank. In this variant (called a "yesnogram"), the row clues instead indicate runs of white pixels, treating black as blank. Column clues remain unchanged from the standard nonogram.

Examples

			a(2) = 14 because, of the 16 2 X 2 grids, 10/01 and 01/10 would have the same set of clues; the other 14 are solvable.
		

Crossrefs

Main diagonal of A385862.
Cf. A242876 (solvable n X n nonograms), A384764 (solvable n X m nonograms), A383345 (solvable n X 2 nonograms or yesnograms).

A385862 Number of n X m yesnograms that can be solved uniquely, read by antidiagonals.

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 1, 4, 4, 1, 1, 8, 14, 8, 1, 1, 16, 52, 52, 16, 1, 1, 32, 210, 368, 210, 32, 1, 1, 64, 816, 2992, 2992, 816, 64, 1, 1, 128, 3206, 23058, 49578, 23058, 3206, 128, 1, 1, 256, 12536, 179576, 775204, 775204, 179576, 12536, 256, 1, 1, 512, 48962, 1388978, 12129616, 24177516, 12129616, 1388978, 48962, 512, 1
Offset: 0

Author

Karl W. Heuer, Aug 06 2025

Keywords

Comments

In a nonogram puzzle, there is a hidden bitonal grid (or 0/1 matrix), and each row and each column is labeled by the length of each successive block of foreground pixels, but without indication of the number of background pixels separating them; the object is to determine the grid contents. In this variant, called a "yesnogram", the pixel value that represents foreground for row clues is the complement of the value that represents foreground for column clues.

Examples

			For the 3 X 4 grid shown below, the row clues (counting runs of 0s) and the column clues (counting runs of 1s) are sufficient to reconstruct the grid, so this is one of the 2992 solvable grids counted in A(3, 4).
       | 1 3 1 2
   ----+--------
   1   | 0 1 1 1
   1 1 | 0 1 0 1
   2   | 1 1 0 0
Top left corner of the array:
  1,  1,   1,     1,      1,        1,         1, ...
  1,  2,   4,     8,     16,       32,        64, ...
  1,  4,  14,    52,    210,      816,      3206, ...
  1,  8,  52,   368,   2992,    23058,    179576, ...
  1, 16, 210,  2992,  49578,   775204,  12129616, ...
  1, 32, 816, 23058, 775204, 24177516, 754845831, ...
		

Crossrefs

Cf. A242876 (solvable n X n nonograms), A384764 (solvable n X m nonograms), A383345 (solvable n X 2 nonograms or yesnograms), A385861 (solvable n X n yesnograms).

Formula

A(0,n) = 1, and A(1,n) = 2^n. A(n,m) = A(m,n), because a grid is solvable iff its complement-transpose is solvable.

A376435 Largest n-digit term in A104179.

Original entry on oeis.org

7, 73, 773, 7523, 77323, 753773, 7732337, 77323733, 773337223, 7773337223, 77735235323, 777352335323, 7773232237523, 77733372233533, 777352353232333, 7773733335332333, 77737523727333737, 777733372232237537, 7777352335323753353, 77773733335332333773
Offset: 1

Author

Karl W. Heuer, Sep 22 2024

Keywords

Examples

			a(3) = 773 because 773 is the largest 3-digit prime that is a concatenation of a 1-digit prime and a 2-digit prime that is itself a concatenation of 1-digit primes.
		

Crossrefs

Subsequence of A104179.

A376434 Smallest n-digit term in A104179.

Original entry on oeis.org

2, 23, 223, 2237, 23333, 223337, 2233373, 22323337, 222335353, 2232333533, 22323332323, 222335353337, 2223337223773, 22233372237737, 222322375373773, 2223223753737733, 22232232373337353, 222237322353237223, 2222327532332333737, 22223353533353323333
Offset: 1

Author

Karl W. Heuer, Sep 22 2024

Keywords

Examples

			a(3) = 223 because 223 is the smallest 3-digit prime that is a concatenation of a 1-digit prime and a 2-digit prime that is itself a concatenation of 1-digit primes.
		

Crossrefs

Subsequence of A104179.

A376433 Number of n-digit primes in A104179.

Original entry on oeis.org

4, 4, 8, 10, 17, 24, 46, 94, 139, 241, 416, 688, 1170, 1969, 3345, 5674, 9527, 16316, 27464, 46668, 78897, 134097, 226457, 381906, 645210, 1093472, 1843869, 3127129, 5278196
Offset: 1

Author

Karl W. Heuer, Sep 22 2024

Keywords

Examples

			a(3) = 8 because there are eight 3-digit primes {223, 233, 337, 353, 373, 523, 733, 773} that are concatenations of a 1-digit prime and a 2-digit prime that is itself a concatenation of 1-digit primes.
		

Crossrefs

A353598 Rounded values of Fahrenheit temperatures for which the corresponding Celsius (Centigrade) temperature rounds to its digit reversal.

Original entry on oeis.org

61, 82, 4862, 5082, 7514, 96635, 9663413658635, 9610113281598335, 9610166586341898335, 48184011328159886762, 50815988671840113282, 75184011328159886714, 966341365863413658635, 48184016658634189886762, 50815983341365810113282, 75184016658634189886714, 966341898867184016658635
Offset: 1

Author

Karl W. Heuer, Apr 29 2022

Keywords

Comments

See comments in A353597.

Examples

			61 is in the list because 60.98 F = 16.1 C and (61, 16) are reversals.
40 is not in the list because 04 is not a proper digit reversal.
		

Crossrefs

Cf. A353597.

A353597 Rounded values of Celsius (Centigrade) temperatures for which the corresponding Fahrenheit temperature rounds to its digit reversal.

Original entry on oeis.org

16, 28, 2684, 2805, 4157, 53669, 5368563143669, 5338951823110169, 5338981436856610169, 26768895182311048184, 28231104817688951805, 41768895182311048157, 536856314368563143669, 26768898143685661048184, 28231101856314338951805, 41768898143685661048157, 536856610481768898143669
Offset: 1

Author

Karl W. Heuer, Apr 29 2022

Keywords

Comments

Neither temperature reading is required to be an integer. In fact, 2684 C = 4863.2 F which would not round to 4862, and 4862 F = 2863.33+ C which would not round to 2864.
Rounding is a necessary part of the definition; there are no solutions in exact integers.
The rounding behavior at half-integers will never be relevant as long as it's consistent (round down, round up, or round-to-even). The only case where half-integers could produce an additional solution is when one of them would need to be rounded up and the other rounded down, but to integers of opposite parity, as in 2075372.5 C = 3735702.5 F.
The sequence is infinite: it includes families such as c = (53691*10^(8*k+4)-166331)/10001 = 53[68563143]669, f = (966438*10^(8*k+3)+8635)/10001 = 966[34136586]35, where the bracketed block of digits occurs k times, for k >= 0.

Examples

			2684 is in the list because 2683.6 C = 4862.48 F and (2684, 4862) are reversals.
		

Crossrefs

Cf. A353598.

Programs

  • Python
    def rv(x, k):
      y = 0
      for i in range(k): x, y = x//10, y*10+x%10
      return y
    def fc(maxlen):
      z, pp = 1, [[0]]*13
      for k in range(1, (maxlen+3)//2):
        z, od, ev = z*10, [], []
        for h in range(13):
          qq = []
          for p in pp[h]:
            for d in range(10):
              if k == 1 and d == 0: continue
              f0 = p + d*(z//10)
              c0 = (154+h-5*f0)*(z//9)%z
              c1, f1 = rv(f0, k), rv(c0, k)
              if c1%10 == f1%10:
                c, f = c1//10*z+c0, f1//10*z+f0
                if 9*c+154+h == 5*f: od.append(c)
              c, f = c1*z+c0, f1*z+f0
              if 9*c+154+h == 5*f: ev.append(c)
              if k < 3 or (9*(c1+2) >= 5*f1 and 5*(f1+1) >= 9*c1): qq.append(f0)
          pp[h] = qq
        for c in sorted(od): print(c)
        for c in sorted(ev): print(c)

A268343 Hermit primes: primes which are not a nearest neighbor of another prime.

Original entry on oeis.org

23, 37, 53, 67, 89, 97, 113, 157, 173, 211, 233, 277, 293, 307, 317, 359, 389, 409, 449, 457, 467, 479, 509, 577, 607, 631, 653, 691, 719, 751, 839, 853, 863, 877, 887, 919, 929, 1039, 1069, 1087, 1201, 1223, 1237, 1283, 1297, 1307, 1327, 1381, 1423, 1439
Offset: 1

Author

Karl W. Heuer, Feb 02 2016

Keywords

Comments

If p is a balanced prime (A006562), with two nearest neighbors, then it eliminates both of those neighbors from being hermits.
Conjecture: the asymptotic probability of a prime being in this list is 1/4.
A subsequence of the isolated primes A007510. The sequence of lonely primes A087770 appears to be a subsequence, except for its first three terms (2, 3 and 7). (This would not be true if one of these were followed by two increasingly larger gaps.) - M. F. Hasler, Mar 15 2016

Examples

			53 is in the list because the previous prime, 47, is closer to 43 than to 53, and the following prime, 59, is closer to 61 than to 53.
		

Crossrefs

Cf. A269734 (number of hermit primes <= prime(n)).

Programs

  • Maple
    N:= 1000: # to get all terms <= N
    pr:= select(isprime, [$2 .. nextprime(nextprime(N))]):
    Np:= nops(pr):
    ishermit:= Vector(Np,1):
    d:= pr[3..Np] + pr[1..Np-2] - 2*pr[2..Np-1]:
    for i from 1 to Np-2 do
      if d[i] > 0 then ishermit[i]:= 0
    elif d[i] < 0 then ishermit[i+2]:= 0
    else ishermit[i]:= 0; ishermit[i+2]:= 0
    fi
    od:
    subs(0=NULL, zip(`*`, pr[1..Np-2],convert(ishermit,list))); # Robert Israel, Mar 09 2016
  • Mathematica
    Select[Prime@ Range@ 228, Function[n, AllTrue[{Subtract @@ Take[#, 2], Subtract @@ Reverse@ Take[#, -2]} &@ Differences[NextPrime[n, #] & /@ {-2, -1, 0, 1, 2}], # < 0 &]]] (* Michael De Vlieger, Feb 02 2016, Version 10 *)
  • PARI
    A268343_list(LIM=1500)={my(d=vector(4),i,o,L=List());forprime(p=1,LIM,(d[i++%4+1]=-o+o=p)d[(i-3)%4+1]&&listput(L,p-d[i%4+1]-d[(i-1)%4+1]));Vec(L)} \\ M. F. Hasler, Mar 15 2016
    
  • PARI
    is_A268343(n,p=precprime(n-1))={n-p>p-precprime(p-1)&&(p=nextprime(n+1))-n>nextprime(p+1)-p&&isprime(n)} \\ M. F. Hasler, Mar 15 2016

Extensions

Deleted my incorrect conjecture about asymptotic behavior. - N. J. A. Sloane, Mar 10 2016

A193163 Irregular table read by rows, in which row n lists the factorions in base n, for n >= 2.

Original entry on oeis.org

1, 2, 1, 2, 1, 2, 7, 1, 2, 49, 1, 2, 25, 26, 1, 2, 1, 2, 1, 2, 41282, 1, 2, 145, 40585, 1, 2, 26, 48, 40472, 1, 2, 1, 2, 519326767, 1, 2, 12973363226, 1, 2, 1441, 1442, 1, 2, 2615428934649, 1, 2, 40465, 43153254185213, 43153254226251, 1, 2, 1, 2, 1, 2, 1, 2
Offset: 2

Author

Karl W. Heuer, Aug 06 2011

Keywords

Comments

Because 1 and 2 are factorions in any base, these mark the start of a new row.

Examples

			49 is in row 5 because 49 = 1! + 4! + 4! and is "144" in base 5.
The first few rows are:
1, 2 (binary)
1, 2 (ternary)
1, 2, 7 (quartal)
1, 2, 49 (quintal)
1, 2, 25, 26 (hexal)
1, 2 (heptal)
1, 2 (octal)
1, 2, 41282 (nonal)
1, 2, 145, 40585 (decimal)
1, 2, 26, 48, 40472 (undecimal)
1, 2 (duodecimal)
1, 2, 519326767, etc.
		

Crossrefs

A152177 Smallest prime factor of G+n, where G is any sufficiently large power tower of 3, e.g., Graham's number.

Original entry on oeis.org

3, 2, 11, 2, 61094071, 2, 3, 2, 5, 2, 17, 2, 3, 2, 41, 2, 147331, 2, 3, 2, 19, 2, 7, 2, 3, 2, 101117, 2, 5, 2, 3, 2, 293, 2
Offset: 0

Author

Karl W. Heuer, Nov 28 2008

Keywords

Examples

			a(2) = 11 because 3^3^3^... + 2 = 0 (mod 11).
		

Crossrefs

Cf. A152178.