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.

A152597 Where records occur in A001917.

This page as a plain text file.
%I A152597 #15 Nov 16 2023 07:44:02
%S A152597 2,4,11,21,31,110,124,185,279,399,716,1028,4552,6207,6543,11424,11557,
%T A152597 12251,16199,23043,43390,155798,203095,457523,699782,865318,1294026,
%U A152597 2918851,5635889,6459777,8999147,9213126,22383796,28194383,32131750,105097565,404165580
%N A152597 Where records occur in A001917.
%H A152597 Amiram Eldar, <a href="/A152597/b152597.txt">Table of n, a(n) for n = 1..47</a>
%F A152597 a(n) = A000720(A226216(n)). - _Amiram Eldar_, Nov 16 2023
%e A152597 First few terms of A001917 (has offset 2) are 1, 1, 2, 1, 1, 2, 1, 2, 1, 6, so a(1) to a(3) are 2, 4, 11.
%o A152597 (Magma) W:=[]; r:=0; for n in [2..100000] do p:=NthPrime(n); a:=(p-1)/Modorder(2, p); if r lt a then r:=a; Append(~W,n); end if; end for; print W;
%o A152597 (Python)
%o A152597 from itertools import islice
%o A152597 from sympy import nextprime, n_order
%o A152597 def agen():
%o A152597     record, v, p = -1, 1, 3
%o A152597     while True:
%o A152597         if v > record: record = v; yield record
%o A152597         v, p = (p-1)//n_order(2, p), nextprime(p)
%o A152597 print(list(islice(agen(), 20))) # _Michael S. Branicky_, Oct 09 2022
%Y A152597 Cf. A001917 ((p-1)/x, where p = prime(n) and x = smallest positive integer such that 2^x == 1 mod p), A152598 (records in A001917), A000720, A226216.
%K A152597 nonn
%O A152597 1,1
%A A152597 _Klaus Brockhaus_, Dec 09 2008
%E A152597 a(27)-a(37) from _Amiram Eldar_, Mar 08 2019