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.

Previous Showing 11-12 of 12 results.

A331546 a(n) = |{k^(k+1)+(k+1)^k (mod prime(n)): k = 0..prime(n)-1}|.

Original entry on oeis.org

1, 3, 5, 6, 7, 9, 11, 15, 15, 17, 19, 24, 25, 28, 28, 34, 39, 38, 41, 50, 43, 48, 55, 56, 60, 62, 70, 68, 70, 76, 76, 83, 83, 78, 88, 106, 95, 98, 105, 110, 117, 106, 114, 126, 114, 129, 138, 139, 143, 148, 146, 141, 152, 159, 164, 160, 170, 171, 176, 182, 184, 191, 192, 190, 193, 194, 216, 215, 215, 217
Offset: 1

Views

Author

Zhi-Wei Sun, Jan 19 2020

Keywords

Comments

Conjecture: |{k^(k+1)+(k+1)^k (mod p): k = 0..p-1}| = (1-1/e)*p + O(p^(1/2)), where p denotes a prime.

Examples

			a(2) = 3 since {0^1+1^0, 1^2+2^1, 2^3+3^2} = {1, 3, 17} is a complete system of residues modulo the second prime 3.
		

Crossrefs

Programs

  • Maple
    f:= proc(p) local S,k;
     nops({seq(k &^ (k+1) + (k+1) &^ k mod p, k=0..p-1)})
    end proc:
    seq(f(ithprime(i)),i=1..100); # Robert Israel, Jan 22 2020
  • Mathematica
    p[n_]:=p[n]=Prime[n];
    a[n_]:=a[n]=Length[Union[Table[Mod[PowerMod[k,k+1,p[n]]+PowerMod[k+1,k,p[n]],p[n]],{k,0,p[n]-1}]]];
    Table[a[n],{n,1,70}]

A097501 p^q + q^p for twin primes p and q.

Original entry on oeis.org

368, 94932, 36314872537968, 244552822542936127033092, 2177185942561672462146321298650240665136431700, 2246585380039521951243337580678537047744572047581514711375688196554564
Offset: 2

Views

Author

Cino Hilliard, Aug 25 2004

Keywords

Comments

Except for the first term, 6 divides a(n). Let p = 3k+2 for odd k since k even implies p even, a contradiction. Then p = 6m + 5 and q = 6m+7 = 6m1 + 1. So p^q+q^p = (6m+5)^(6m1+1) + (6m1+1)^(6m+5) = 6H + 5^odd + 1^odd. Now 5 = (6-1) and (6-1)^odd + 1 = 6G -1 + 1 = 6G as stated. Are 3 and 17 the only primes in A051442(n)?

Examples

			Consider the second twin prime pair (5,7). 5^7 + 7^5 = 94932, the 2nd entry.
		

Crossrefs

Cf. A051442.

Programs

  • Mathematica
    lst={}; Do[p=Prime[n]; If[PrimeQ[q=p+2],a=(p^q+q^p); AppendTo[lst,a]],{n,2*4!}]; lst (* Vladimir Joseph Stephan Orlovsky, Aug 16 2009 *)
    #[[1]]^#[[2]]+#[[2]]^#[[1]]&/@Select[Partition[Prime[Range[20]],2,1],#[[2]] - #[[1]]==2&] (* Harvey P. Dale, Sep 07 2019 *)
  • PARI
    f(n) = for(x=1,n,p=prime(x);q=prime(x+1);if(q-p==2,v=p^q+q^p;print1(v",")))
Previous Showing 11-12 of 12 results.