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.

A261020 Numbers k such that the set of the decimal digits is a subgroup of the multiplicative group (Z/mZ)* where m is the sum of the decimal digits of k.

This page as a plain text file.
%I A261020 #45 Feb 16 2025 08:33:26
%S A261020 11,12,13,14,15,16,17,18,19,21,31,41,51,61,71,81,91,111,124,139,142,
%T A261020 193,214,241,319,391,412,421,913,931,1111,1115,1133,1151,1155,1177,
%U A261020 1199,1248,1284,1313,1331,1379,1397,1428,1482,1511,1515,1551,1717,1739,1771,1793
%N A261020 Numbers k such that the set of the decimal digits is a subgroup of the multiplicative group (Z/mZ)* where m is the sum of the decimal digits of k.
%C A261020 (Z/mZ)* is the multiplicative group of units of Z/mZ.
%C A261020 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 products d(i)*d(j) (mod m) for 1 <= i,j <= q, and also the multiplicative inverse of each element such that if x is in the group, then there exists x' in the group where x*x' = 1.
%C A261020 The sequence is infinite because the numbers 11, 111, 1111, ... are in the sequence and generate the trivial subgroup {1}.
%C A261020 Only zerofree elements of A009996 have to be checked. Terms that match the criterion and permutations of their digits form all terms of this sequence due to commutativity of multiplication. - _David A. Corneth_, Aug 08 2015
%C A261020 To reduce cases, only check terms from A009995 (containing a 1 but no 0) for values m from digsum(term) to 81. - _David A. Corneth_, Aug 13 2015
%C A261020 Each decimal digit must be relatively prime to the decimal digit sum. - _Tom Edgar_, Aug 17 2015
%H A261020 Michel Lagneau and David A. Corneth, <a href="/A261020/b261020.txt">Table of n, a(n) for n = 1..10083</a> (all elements < 10^14, first 268 terms from Michel Lagneau)
%H A261020 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/FiniteGroup.html">Finite Group</a>
%H A261020 Wikipedia, <a href="http://en.wikipedia.org/wiki/Finite_group">Finite group</a>
%e A261020 139 is a term because 1+3+9 = 13 and the elements {1, 3, 9} form a subgroup of the multiplicative group (Z/13Z)* with 12 elements. Each element is invertible: 1*1 == 1 (mod 13), 3*9 == 1 (mod 13) and 9*3 == 1 (mod 13). The other numbers of the sequence having the same property with (Z/13Z)* are 139, 193, 319, 391, 913, and 931.
%e A261020 1248 is in the sequence because 1+2+4+8 = 15 and the elements {1, 2, 4, 8} form a subgroup of the multiplicative group (Z/15Z)* with 8 elements: {1,2,4,7,8,11,13,14}.
%p A261020 nn:=2000:
%p A261020 for n from 1 to nn do:
%p A261020 x:=convert(n,base,10):nn0:=length(n):
%p A261020 lst1:={op(x),x[nn0]}:n0:=nops(lst1):
%p A261020 s:=sum('x[i]', 'i'=1..nn0):lst:={}:
%p A261020    if  lst1[1]=1 then
%p A261020     for j from 1 to n0 do:
%p A261020      for l from j to n0 do:
%p A261020       p:=irem(lst1[j]*lst1[l],s):lst:=lst union {p}:
%p A261020      od:
%p A261020     od:
%p A261020     if lst=lst1
%p A261020      then
%p A261020        n3:=nops(lst1):lst2:={}:
%p A261020         for c from 1 to n3 do:
%p A261020           for d from 1 to n3 do:
%p A261020            if irem(lst1[c]*lst1[d], s)=1
%p A261020             then
%p A261020             lst2:=lst2 union {lst1[c]}:
%p A261020             else
%p A261020            fi:
%p A261020           od:
%p A261020          od:
%p A261020            if lst2=lst
%p A261020            then
%p A261020            printf(`%d, `, n):
%p A261020            else
%p A261020            fi:
%p A261020           fi:
%p A261020          fi:
%p A261020      od:
%o A261020 (Sage)
%o A261020 def is_group(n):
%o A261020     DD=n.digits()
%o A261020     digsum=sum(DD)
%o A261020     D=Set(DD)
%o A261020     if not(1 in D) or 0 in D:
%o A261020         return false
%o A261020     for x in D:
%o A261020         for y in D:
%o A261020             if not(gcd(y,digsum)==1):
%o A261020                 return false
%o A261020             if not((x*inverse_mod(y,digsum))%digsum in D):
%o A261020                 return false
%o A261020     return true
%o A261020 [n for n in [1..2000] if is_group(n)] # _Tom Edgar_, Aug 17 2015
%Y A261020 Cf. A011531, A261021, A261322.
%K A261020 nonn,base
%O A261020 1,1
%A A261020 _Michel Lagneau_, Aug 07 2015