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.

A108116 Base 10 weak Skolem-Langford numbers.

This page as a plain text file.
%I A108116 #24 Feb 13 2023 12:28:11
%S A108116 2002,131003,231213,300131,312132,420024,12132003,14130043,15120025,
%T A108116 23121300,23421314,25121005,25320035,30023121,31213200,31413004,
%U A108116 34003141,40031413,41312432,45001415,45121425,45300435,50012152,51410054,52002151,52412154,53002352,53400354,61310036
%N A108116 Base 10 weak Skolem-Langford numbers.
%C A108116 Self-describing numbers: between two digits "d" there are d digits.
%C A108116 a(n) has either 0 or 2 instances of any digit, hence even number of digits.
%C A108116 Largest element is a(20120) = 978416154798652002.
%C A108116 Named after the Norwegian mathematician Thoralf Albert Skolem (1887-1963) and the British chemist and mathematics teacher Charles Dudley Langford (1905-1969). - _Amiram Eldar_, Jun 17 2021
%D A108116 E. Angelini, "Jeux de suites", in Dossier Pour La Science, pp. 32-35, Volume 59 (Jeux math'), April/June 2008, Paris.
%H A108116 D. Wilson, <a href="/A108116/b108116.txt">Complete table of n, a(n) for n = 1..20120</a>
%e A108116 In "2002" there are 2 digits between the two 2's and 0 digits between the two 0's.
%e A108116 In "131003" there is 1 digit between the two 1's, 3 digits between the two 3's and 0 digit between the two 0's.
%o A108116 (Python)
%o A108116 def SL(d, s):
%o A108116   for i1 in range(int(d[0]=="0"), len(s)-int(d[0])-1):
%o A108116     i2 = i1 + int(d[0]) + 1
%o A108116     if not (s[i1] or s[i2]):
%o A108116       s[i1] = s[i2] = d[0]
%o A108116       r = d[1:]
%o A108116       if r: yield from SL(r, s)
%o A108116       else: yield int("".join(s))
%o A108116       s[i1] = s[i2] = 0
%o A108116 from itertools import chain, combinations as C
%o A108116 def A108116gen():
%o A108116   for numd in range(1, 11):
%o A108116     dset, s = "0123456789", [0 for _ in range(2*numd)]
%o A108116     for an in sorted(
%o A108116       chain.from_iterable(SL("".join(c), s) for c in C(dset, numd))):
%o A108116       yield an
%o A108116 for n, an in enumerate(A108116gen(), start=1):
%o A108116   print(n, an) # _Michael S. Branicky_, Dec 14 2020
%Y A108116 Base 10 strong Skolem-Langford numbers are in A132291.
%Y A108116 Base 10 weaker Skolem-Langford numbers are in A357826.
%K A108116 base,easy,fini,full,nonn
%O A108116 1,1
%A A108116 _Eric Angelini_, Jun 26 2005, Aug 10 2007
%E A108116 Edited by _N. J. A. Sloane_, Nov 18 2007