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 A185343 #33 Jul 24 2023 13:00:34 %S A185343 2,0,2,6,62,210,2570,9198,121574,2,23091222,48,2,68186767614,6,2,48, %T A185343 12600235023025650,109368,794502,24,2550476412689091085878,6,2,10, %U A185343 8367330694575771627040945250,4030501264,6,955272,2,446564785985483547852197647548252246,8,8,32424,8 %N A185343 Least positive number k such that k*p+1 divides 2^p+1 where p is prime(n), or 0 if no such number exists. %C A185343 Akin to A186283 except for 2^p+1 and restricted to primes. %C A185343 The larger terms of this sequence occur for the primes p > 3 in sequence A000978. These large terms are (2^p-2)/(3p). %C A185343 a(n) = 2 iff prime(n) is in A103579. - _Robert Israel_, Jul 17 2023 %e A185343 2^3+1 = 9 has no factor of the form k*3+1 except 1, so a(primepi(3)) = a(2) = 0. %e A185343 2^29+1 = 536870913 has factor 2*29+1=59, so a(primepi(29)) = a(10) = 2. %p A185343 f:= proc(n) local p,F; %p A185343 p:= ithprime(n); %p A185343 F:= select(t -> t mod p = 1, numtheory:-divisors(2^p+1) minus {1}); %p A185343 if F = {} then 0 else (min(F)-1)/p; fi %p A185343 end proc: %p A185343 map(f, [$1..50]); # _Robert Israel_, Jul 17 2023 %t A185343 Table[q = First /@ FactorInteger[2^p + 1]; s = Select[q, Mod[#1, p] == 1 &, 1]; If[s == {}, 0, (s[[1]] - 1)/p], {p, Prime[Range[30]]}] %Y A185343 Cf. A098268, A103579, A186283. %K A185343 easy,nonn %O A185343 1,1 %A A185343 _Bill McEachen_, Feb 26 2011