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.

A247824 Least positive integer m such that m + n divides prime(m) + prime(n).

Original entry on oeis.org

1, 5, 5, 5, 2, 2, 38, 16, 40, 12, 13, 1, 11, 1, 11, 4, 35, 38, 35, 35, 38, 35, 35, 36, 31, 31, 33, 33, 36, 36, 25, 25, 2, 25, 4, 3, 4, 6, 6, 8, 222, 8, 95, 223, 99, 98, 95, 88, 222, 94, 93, 94, 95, 92, 226, 88, 83, 92, 225, 92
Offset: 1

Views

Author

Zhi-Wei Sun, Sep 24 2014

Keywords

Comments

Conjecture: a(n) exists for any n > 0. Moreover, a(n) < n*(n-1) for all n > 2. - Zhi-Wei Sun, Sep 25 2014
A247869(n) = (prime(a(n)) + prime(n)) / (a(n) + n). - Reinhard Zumkeller, Sep 27 2014
I have verified the conjecture for n up to 10^5, and noted that max{a(n): n=1..10^5} = a(79276) = 3141281384 > 3*10^9. - Zhi-Wei Sun, Oct 08 2014
I would like to offer 500 US dollars as the prize for the first proof of the above conjecture. - Zhi-Wei Sun, Feb 24 2018
Chang Zhang (a student of Nanjing Univ.) has verified the conjecture for n up to 4*10^5. For example, a(337647) = 21342496785. - Zhi-Wei Sun, Jun 22 2020

Examples

			a(2) = 5 since 5 + 2 = 7 divides prime(5) + prime(2) = 11 + 3 = 14.
a(10409) = 69804276 since 69804276 + 10409 = 69814685 divides prime(10409) + prime(69804276) = 109481 + 1396184219 = 1396293700 = 20*69814685.
a(35980) = 180302246 since 35980 + 180302246 = 180338226 divides prime(35980) + prime(180302246) = 427727 + 3786675019 = 3787102746 = 21*180338226.
a(79276) = 3141281384 since 79276 + 3141281384 = 3141360660 divides prime(79276) + prime(3141281384) = 1010431 + 75391645409 = 75392655840 = 24*3141360660.
		

Crossrefs

Programs

  • Haskell
    import Data.List (genericIndex)
    a247824 n = genericIndex a247824_list (n - 1)
    a247824_list = f ips where
       f ((x, p) : xps) = head
         [y | (y, q) <- ips, (p + q) `mod` (x + y) == 0] : f xps
       ips = zip [1..] a000040_list
    -- Reinhard Zumkeller, Sep 27 2014
  • Mathematica
    Do[m=1;Label[aa];If[Mod[Prime[m]+Prime[n],m+n]==0,Print[n," ",m];Goto[bb]];m=m+1;Goto[aa];Label[bb];Continue,{n,1,60}]
    lpi[n_]:=Module[{k=1,p=Prime[n]},While[!Divisible[p+Prime[k],k+n], k++]; k]; Array[lpi,60] (* Harvey P. Dale, Apr 23 2015 *)
  • PARI
    a(n) = {m = 1; while ((prime(m) + prime(n)) % (m + n), m++); m;} \\ Michel Marcus, Sep 25 2014
    
  • PARI
    a(n)=my(p=prime(n),m); forprime(q=2,, if((p+q)%(n+m++)==0, return(m))) \\ Charles R Greathouse IV, Sep 25 2014