login
A378275
Numbers m which satisfy the equation: (m - floor((m - k)/k)) mod k = 1 (1 <= k <= m) only for k = 2 and m - 1.
3
3, 4, 7, 11, 19, 23, 59, 83, 167, 227, 491, 659, 839, 983, 1019, 1091, 1319, 1459, 1523, 1847, 2179, 2503, 2963, 3719, 3767, 4519, 4871, 4919, 5059, 6563, 9239, 9419, 10883, 12107, 12539, 14891, 15383, 20071, 20747, 23819, 25219, 26759, 33851, 35591, 37379, 45191
OFFSET
1,1
COMMENTS
Every term greater than 4 has the form 4*t + 3.
Let b(z) be the number of elements of this sequence <= z:
-------------
z | b(z)
-------------
10^2 | 8
10^3 | 14
10^4 | 32
10^5 | 55
10^6 | 125
10^7 | 347
10^8 | 950
-------------
Every term greater than 4 is prime.
LINKS
EXAMPLE
Let T(i,j) be the triangle read by rows: T(i,j) = (i - floor((i - j)/j)) mod j for 1 <= j <= i. The triangle begins:
i\j | 1 2 3 4 5 6 7 8 9 ...
-----+------------------
1 | 0
2 | 0 0
3 | 0 1 0
4 | 0 1 1 0
5 | 0 0 2 1 0
6 | 0 0 2 2 1 0
7 | 0 1 0 3 2 1 0
8 | 0 1 1 3 3 2 1 0
9 | 0 0 1 0 4 3 2 1 0
...
The j-th column has period j^2, r-th element of this period has the form (r - 1 - floor((r - 1)/j)) mod j (1 <= r <= j^2). The period of j-th column consists of the sequence (0,1,2,...,j-1) and its consecutive j-1 right rotations (moving rightmost element to the left end).
7 is in this sequence because the only k's satisfying the equation (7 - floor((7 - k)/k)) mod k = 1 are 2 and (7-1).
PROG
(Maxima)
(f(i, j):=mod((i-floor((i-j)/j)), j),
(n:3, for t:7 thru 100000 step 4 do
(for k:3 while f(t, k)#1 and k<ceiling(t/2) do
(if k=ceiling(t/2)-1 then (print(n, "", t), n:n+1)))));
(PARI) is(m) = if(m%4==3, for(k=3, m\2, if((m-m\k)%k==0, return(0))); 1, m==4); \\ Jinyuan Wang, Jan 14 2025
CROSSREFS
KEYWORD
nonn
AUTHOR
Lechoslaw Ratajczak, Nov 21 2024
STATUS
approved