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.

Showing 1-4 of 4 results.

A022549 Sum of a square and a nonnegative cube.

Original entry on oeis.org

0, 1, 2, 4, 5, 8, 9, 10, 12, 16, 17, 24, 25, 26, 27, 28, 31, 33, 36, 37, 43, 44, 49, 50, 52, 57, 63, 64, 65, 68, 72, 73, 76, 80, 81, 82, 89, 91, 100, 101, 108, 113, 121, 122, 125, 126, 127, 128, 129, 134, 141, 144, 145
Offset: 1

Views

Author

Keywords

Comments

It appears that there are no modular constraints on this sequence; i.e., every residue class of every integer has representatives here. - Franklin T. Adams-Watters, Dec 03 2009
A045634(a(n)) > 0. - Reinhard Zumkeller, Jul 17 2010

Crossrefs

Complement of A022550; A002760 and A179509 are subsequences.

Programs

  • Mathematica
    q=30; imax=q^2; Select[Union[Flatten[Table[x^2+y^3, {y,0,q^(2/3)}, {x,0,q}]]], #<=imax&] (* Vladimir Joseph Stephan Orlovsky, Apr 20 2011 *)
  • PARI
    is(n)=for(k=0,sqrtnint(n,3), if(issquare(n-k^3), return(1))); 0 \\ Charles R Greathouse IV, Aug 24 2020
    
  • PARI
    list(lim)=my(v=List(),t); for(k=0,sqrtnint(lim\=1,3), t=k^3; for(n=0,sqrtint(lim-t), listput(v,t+n^2))); Set(v) \\ Charles R Greathouse IV, Aug 24 2020

A206606 Primes that can be written as a sum of a positive square and a positive cube in more than two ways.

Original entry on oeis.org

2089, 4481, 7057, 15193, 15641, 16649, 23417, 34721, 65537, 68489, 69697, 72577, 93241, 118673, 123209, 146161, 173897, 176401, 191969, 199873, 205721, 216233, 239633, 259121, 264169, 271169, 280009, 286289, 296353, 301409, 318313, 342233, 347993, 357569, 381529, 447569, 466273, 477577, 526249, 534577
Offset: 1

Views

Author

Keywords

Comments

A subset of these, {65537, 93241, 191969, ..} allows this representation in more than 3 ways.

Examples

			2089 = 19^2+12^3 = 33^2+10^3 = 45^2+4^3
		

Crossrefs

Programs

  • Maple
    N:= 10^6: # to get all terms <= N
    for x from 1 to floor(N^(1/2)) do
      for y from 1 to floor((N-x^2)^(1/3)) do
        p:= x^2 + y^3;
        if isprime(p) then
          if assigned(R[p]) then R[p]:= R[p]+1
          else R[p]:= 1
          fi
        fi
      od
    od:
    sort(map(op,select(t -> R[op(t)]>2, [indices(R)]))); # Robert Israel, Mar 21 2017
  • Mathematica
    t={}; Do[Do[AppendTo[t,n^2+m^3],{n,300}],{m,300}]; t=Sort[t]; t3={}; Do[If[t[[n]]==t[[n+2]]&&PrimeQ[t[[n]]],AppendTo[t3,t[[n]]]],{n,Length[t]-2}]; t3; f1[l_]:=Module[{t={}},Do[If[l[[n]]!=l[[n+1]],AppendTo[t,l[[n]]]],{n,Length[l]-1}];t]; (*ExtractSingleTermsOnly*) f1[t3] (* or *)
    mx = 10^6; First /@ Sort@ Select[ Tally[ Join @@ Reap[(Sow@ Select[#^3 + Range[ Sqrt[mx - #^3]]^2, PrimeQ]) & /@ Range[mx^(1/3)]][[2, 1]]], #[[2]]>2 &] (* faster, Giovanni Resta, Mar 21 2017 *)

Extensions

More terms from Robert Israel, Mar 21 2017

A162930 Primes that can be written as a sum of a positive square and a positive cube in more than one way.

Original entry on oeis.org

17, 89, 233, 449, 577, 593, 1289, 1367, 1601, 1753, 2089, 2521, 3391, 4481, 4721, 5953, 6121, 6427, 7057, 7577, 8081, 9649, 10313, 10657, 10729, 11969, 12329, 13121, 13457, 15137, 15193, 15641, 15661, 16033, 16649, 18523, 21673, 21961, 23201
Offset: 1

Views

Author

Keywords

Comments

A subset of these, 2089, 4481, 7057, 15193, 15641, etc., allows this representation in more than two ways (See A206606).

Examples

			The prime 17 can be written 1^3 + 4^2 as well as 2^3 + 3^2.
		

Crossrefs

Programs

  • Maple
    isA162930 := proc(n) if isprime(n) then wa := 0 ; for y from 1 to n/2 do if issqr(n-y^3) then if n -y^3 > 0 then wa := wa+1 ; fi; fi; od: RETURN( wa>1) ; else false; fi; end:
    for i from 1 to 2700 do if isA162930 ( ithprime(i)) then printf("%d,",ithprime(i)) ; fi; od: # R. J. Mathar, Jul 21 2009
  • Mathematica
    lst={};Do[Do[AppendTo[lst,n^2+m^3],{n,2*5!}],{m,2*5!}];lst=Sort[lst]; lst2={};Do[If[lst[[n]]==lst[[n+1]]&&PrimeQ[lst[[n]]],AppendTo[lst2, lst[[n]]]],{n,Length[lst]-1}];lst2;
  • PARI
    upto(n) = {my(res = List(), v = vector(n), i, j, i2); for(i = 1, sqrtint(n), i2 = i^2; for(j = 1, sqrtnint(n - i^2, 3), v[i2 + j^3]++)); forprime(p = 2, n, if(v[p] > 1, listput(res, p))); kill(v); res} \\ David A. Corneth, Jun 20 2023

Formula

A000040 INTERSECT A054402.

Extensions

Slightly edited by R. J. Mathar, Jul 21 2009

A235471 Primes whose base-8 representation also is the base-3 representation of a prime.

Original entry on oeis.org

2, 17, 73, 521, 577, 593, 1097, 1153, 4177, 8713, 33353, 33857, 37889, 41617, 65537, 65609, 69697, 70289, 70793, 74897, 262153, 262657, 266369, 331777, 331921, 336529, 336977, 529489, 533129, 533633, 590921, 594953, 598537, 2098241, 2101249, 2102417, 2134529
Offset: 1

Views

Author

M. F. Hasler, Jan 12 2014

Keywords

Comments

This sequence is part of the two-dimensional array of sequences based on this same idea for any two different bases b, c > 1. Sequence A235265 and A235266 are the most elementary ones in this list. Sequences A089971, A089981 and A090707 through A090721, and sequences A065720 - A065727, follow the same idea with one base equal to 10.
For further motivation and cross-references, see sequence A235265 which is the main entry for this whole family of sequences.
Seems to be a subsequence of A066649 and A123364.
Since the trailing digit of the base 7 expansion must (like all others) be less than 3, this is a subsequence of A045381.

Examples

			E.g., 17 = 21_8 and 21_3 = 7 are both prime.
		

Crossrefs

Cf. A231478, A065720A036952, A065721 - A065727, A235394, A235395, A089971A020449, A089981, A090707 - A091924, A235461 - A235482, A235615 - A235639. See the LINK for further cross-references.

Programs

  • Mathematica
    b8b3pQ[n_]:=Module[{id8=IntegerDigits[n,8]},Max[id8]<3&&PrimeQ[ FromDigits[ id8,3]]]; Select[Prime[Range[160000]],b8b3pQ] (* Harvey P. Dale, Mar 16 2019 *)
  • PARI
    is(p,b=3,c=8)=vecmax(d=digits(p,c))
    				
  • PARI
    forprime(p=1,1e3,is(p,8,3)&&print1(vector(#d=digits(p,3),i,8^(#d-i))*d~,",")) \\ To produce the terms, this is more efficient than to select them using straightforwardly is(.)=is(.,3,8)
Showing 1-4 of 4 results.