[go: up one dir, main page]

login
Numbers k such that A037276(k) == -1 (mod k).
1

%I #28 Mar 07 2022 07:53:51

%S 1,6,14,18,48,124,134,284,3135,4221,9594,16468,34825,557096,711676,

%T 746464,1333334,2676977,6514063,11280468,16081252,35401658,53879547,

%U 133333334,198485452,223856659,1333333334,2514095219,2956260256,3100811124,10912946218,19780160858

%N Numbers k such that A037276(k) == -1 (mod k).

%C Numbers k such that the concatenation of prime factors of k is 1 less than a multiple of k.

%C Contains 2*m for m in A093170.

%C Terms k where k-1 is prime include 6, 14, 18, 48 and 284. Are there others?

%H Martin Ehrenstein, <a href="/A351975/b351975.txt">Table of n, a(n) for n = 1..38</a>

%e a(4) = 48 is a term because 48=2*2*2*2*3 and 22223 == -1 (mod 48).

%p tcat:= proc(x,y) x*10^(1+ilog10(y))+y end proc:

%p filter:= proc(n) local F,t,i;

%p F:= map(t -> t[1]$t[2], sort(ifactors(n)[2],(a,b)->a[1]<b[1]));

%p t:= F[1];

%p for i from 2 to nops(F) do

%p t:= tcat(t,F[i])

%p od;

%p t mod n = n-1

%p end proc:

%p filter(1):= true:

%p select(filter, [$1..10^8]);

%o (Python)

%o from sympy import factorint

%o def A037276(n):

%o if n == 1: return 1

%o return int("".join(str(p)*e for p, e in sorted(factorint(n).items())))

%o def afind(limit, startk=1):

%o for k in range(startk, limit+1):

%o if (A037276(k) + 1)%k == 0:

%o print(k, end=", ")

%o afind(10**6) # _Michael S. Branicky_, Feb 27 2022

%o # adapted and corrected by _Martin Ehrenstein_, Mar 06 2022

%o (Python)

%o from itertools import count, islice

%o from sympy import factorint

%o def A351975_gen(startvalue=1): # generator of terms >= startvalue

%o for k in count(max(startvalue,1)):

%o c = 0

%o for d in sorted(factorint(k,multiple=True)):

%o c = (c*10**len(str(d)) + d) % k

%o if c == k-1:

%o yield k

%o A351975_list = list(islice(A351975_gen(),10)) # _Chai Wah Wu_, Feb 28 2022

%Y Cf. A037276, A093170.

%K nonn,base

%O 1,2

%A _J. M. Bergot_ and _Robert Israel_, Feb 26 2022

%E a(24)-a(25) from _Michael S. Branicky_, Feb 27 2022

%E Prepended 1 and more terms from _Martin Ehrenstein_, Feb 28 2022