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-2 of 2 results.

A261322 Non-repunit elements of A261020 in nonincreasing order.

Original entry on oeis.org

21, 31, 41, 51, 61, 71, 81, 91, 421, 931, 3311, 5111, 5511, 7711, 8421, 9731, 9911, 311111, 444111, 711111, 777111, 993311, 8811111, 51111111, 55551111, 91111111, 93333311, 99311111, 99991111, 441111111, 6666611111, 7111111111, 9333311111, 411111111111, 555111111111, 771111111111, 777777111111, 911111111111
Offset: 1

Views

Author

David A. Corneth, Aug 14 2015

Keywords

Comments

Permutations of digits of all terms in this sequence are in A261020. There are 2403274 such permutations. About 38% (binomial(32,6) = 906192) of these permutations come from a(61) = 99999911111111111111111111111111.
On average, for every number of digits from 1 to 72, there's exactly one element.

Examples

			{1, 3, 9} forms a group under multiplication in Z/mZ for m = 13 and m = 26 (and no other values of m). m is the sum of digits of a term, so we can solve 9*x + 3*y + 1*z in {13, 26} for (x, y, z) >= (1, 1, 1). Solutions are (x, y, z) in {(1, 1, 1), (2, 2, 2), ..., (1, 1, 14)}. A solution (x, y, z) denotes a term starting with x nines, then followed by y threes, and then by z ones.
		

Crossrefs

Cf. A261020.

A261021 a(1)=0; for n > 1, a(n) is the number k such that the set of the decimal digits is an additive group Z/mZ where m is the sum of the decimal digits.

Original entry on oeis.org

0, 101, 102, 110, 120, 201, 202, 204, 210, 220, 240, 303, 306, 330, 360, 402, 404, 408, 420, 440, 480, 505, 550, 603, 606, 630, 660, 707, 770, 804, 808, 840, 880, 909, 990, 1001, 1002, 1010, 1020, 1100, 1200, 2001, 2002, 2004, 2010, 2020, 2040, 2100, 2200, 2400
Offset: 1

Views

Author

Michel Lagneau, Aug 07 2015

Keywords

Comments

By convention, a(1)=0 because the trivial additive group is usually denoted by 0 where 0 is the identity element.
Let d(1)d(2)..d(q) be the q decimal digits of a number k. The principle of the algorithm is to compute all the sums (d(i)+ d(j))/mZ for 1 <= i,j <= q, and also the additive inverse of each element such that if x is in the group, then there exists x' in the group where x+x' = 0.
The sequence is infinite because the numbers 101, 1001, 10001, ... are in the sequence and generate the group {0,1}.
Only terms of A009996 containing at least one 0 have to be checked. Terms that match the criterion and numbers containing at least one 0 formed by permutations of their digits form all terms of this sequence due to commutativity of addition. - David A. Corneth, Aug 13 2015

Examples

			408 is in the sequence because 4+0+8 = 12 and the elements {0, 4, 8} is an additive group, subgroup of (Z/12Z,+) with 6 elements {0, 2, 4, 6, 8, 10}. Each element has an inverse: 2+10 == 0 (mod 12), 4+8 == 0 (mod 12), 6+6 == 0 (mod 12), 8+4 == 0 (mod 12) and 10+2 == 0 (mod 12).
The subsequence having the same property with Z/12Z is {408, 480, 606, 660, 804, 840, 4008, 4080, 4800, 6006, 6060, 6600, 8004, 8040, 8400, 40008, 40080, 40800, 48000, 60006, 60060, 60600, 66000, 80004, 80040, 80400, 84000, ...}.
		

Crossrefs

Programs

  • Maple
    nn:=3000:
    for n from 1 to nn do:
    x:=convert(n,base,10):nn0:=length(n):
    lst1:={op(x),x[nn0]}:n0:=nops(lst1):
    s:=sum('x[i]', 'i'=1..nn0):lst:={}:
       if  lst1[1]=0 then
        for j from 1 to n0 do:
         for l from j to n0 do:
          p:=irem(lst1[j]+lst1[l],s):lst:=lst union {p}:
         od:
        od:
        if lst=lst1
         then
           n3:=nops(lst1):lst2:={}:
            for c from 1 to n3 do:
              for d from 1 to n3 do:
               if irem(lst1[c]+lst1[d], s)=0
                then
                lst2:=lst2 union {lst1[c]}:
                else
               fi:
              od:
             od:
               if lst2=lst
               then
               printf(`%d, `, n):
               else
               fi:
              fi:
             fi:
         od:
  • PARI
    is(n) = {my(d = digits(n),s = Set(digits(n))); if(n==0,return(1));
    if(#s==2 || #s==3,return(s[1]==0 && (s[#s] / s[2] == 2^(#s-2)) && hammingweight(d)==2),return(0))}
    \\a(n) works for n > 1.
    a(n) = {my(qd = ((-1 + sqrt(1 + 8*(n + 15+1/2) / 17)) / 2)\1 + 2, v = vector(qd),i=1,h=2); n -= (binomial(qd-1,2)*17 -16); while(n-(qd-1)*h>0,
    n-=(qd-1)*h;i++; h=1 + (i%2 == 0) + (i < 5)); n--; v[1]=i;
    v[qd-n\h] = i*2^(n%h-(i%2==0)); sum(i=1,#v,10^(#v-i)*v[i])} \\ David A. Corneth, Aug 13 2015

Formula

For d >= 3, there are (d - 1) * 17 terms having d digits. - David A. Corneth, Aug 13 2015
Showing 1-2 of 2 results.