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.

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.

This page as a plain text file.
%I A378275 #8 Jan 15 2025 08:40:28
%S A378275 3,4,7,11,19,23,59,83,167,227,491,659,839,983,1019,1091,1319,1459,
%T A378275 1523,1847,2179,2503,2963,3719,3767,4519,4871,4919,5059,6563,9239,
%U A378275 9419,10883,12107,12539,14891,15383,20071,20747,23819,25219,26759,33851,35591,37379,45191
%N 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.
%C A378275 Every term greater than 4 has the form 4*t + 3.
%C A378275 Let b(z) be the number of elements of this sequence <= z:
%C A378275 -------------
%C A378275    z  | b(z)
%C A378275 -------------
%C A378275  10^2 |   8
%C A378275  10^3 |  14
%C A378275  10^4 |  32
%C A378275  10^5 |  55
%C A378275  10^6 | 125
%C A378275  10^7 | 347
%C A378275  10^8 | 950
%C A378275 -------------
%C A378275 Every term greater than 4 is prime.
%H A378275 Jinyuan Wang, <a href="/A378275/b378275.txt">Table of n, a(n) for n = 1..3000</a>
%e A378275 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:
%e A378275  i\j | 1 2 3 4 5 6 7 8 9 ...
%e A378275 -----+------------------
%e A378275    1 | 0
%e A378275    2 | 0 0
%e A378275    3 | 0 1 0
%e A378275    4 | 0 1 1 0
%e A378275    5 | 0 0 2 1 0
%e A378275    6 | 0 0 2 2 1 0
%e A378275    7 | 0 1 0 3 2 1 0
%e A378275    8 | 0 1 1 3 3 2 1 0
%e A378275    9 | 0 0 1 0 4 3 2 1 0
%e A378275  ...
%e A378275 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).
%e A378275 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).
%o A378275 (Maxima)
%o A378275 (f(i, j):=mod((i-floor((i-j)/j)), j),
%o A378275 (n:3, for t:7 thru 100000 step 4 do
%o A378275 (for k:3 while f(t, k)#1 and k<ceiling(t/2) do
%o A378275 (if k=ceiling(t/2)-1 then (print(n, "", t), n:n+1)))));
%o A378275 (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
%Y A378275 Cf. A000040, A048158, A051731, A375007, A375595.
%K A378275 nonn
%O A378275 1,1
%A A378275 _Lechoslaw Ratajczak_, Nov 21 2024