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.
%I A226038 #23 Aug 29 2025 11:10:42 %S A226038 0,1,2,3,4,6,7,8,10,12,15,16,18,22,24,26,28,30,31,36,40,42,44,46,48, %T A226038 52,58,60,63,66,70,72,78,80,82,88,96,100,102,106,108,112,120,124,126, %U A226038 127,130,136,138,148,150,156,162,166,168,172,178,180,190,192,196,198 %N A226038 Numbers k such that there are no primes p which divide k+1 and p-1 does not divide k. %C A226038 These are the numbers which satisfy the weak Clausen condition but not the Clausen condition. %H A226038 Ivan Neretin, <a href="/A226038/b226038.txt">Table of n, a(n) for n = 1..10000</a> %H A226038 Peter Luschny, <a href="http://www.luschny.de/math/euler/GeneralizedBernoulliNumbers.html">Generalized Bernoulli numbers</a>. %e A226038 A counterexample is n = 14. 5 divides 15 but 4 does not divide 14. %p A226038 s := (p,n) -> ((n+1) mod p = 0) and (n mod (p-1) <> 0); %p A226038 F := n -> select(p -> s(p,n), select('isprime', [$2..n])); %p A226038 A226038_list := n -> select(k -> [] = F(k), [$0..n]); %p A226038 A226038_list(200); %t A226038 s[p_, n_] := Mod[n+1, p] == 0 && Mod[n, p-1] != 0; f[n_] := Select[ Select[ Range[n], PrimeQ], s[#, n] &]; A226038 = Select[ Range[0, 200], f[#] == {} &] (* _Jean-François Alcover_, Jul 29 2013, after Maple *) %t A226038 Join[{0}, Select[Range[200], And @@ Divisible[#, FactorInteger[# + 1][[All, 1]] - 1] &]] (* _Ivan Neretin_, Aug 04 2016 *) %o A226038 (Sage) %o A226038 def F(n): return filter(lambda p: ((n+1) % p == 0) and (n % (p-1) != 0), primes(n)) %o A226038 def A226038_list(n): return list(filter(lambda n: not list(F(n)), (0..n))) %o A226038 A226038_list(200) %Y A226038 Cf. A226039, A226040, A225481. %K A226038 nonn,changed %O A226038 1,3 %A A226038 _Peter Luschny_, May 27 2013