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 31-40 of 43 results. Next

A081324 Twice a square but not the sum of 2 distinct squares.

Original entry on oeis.org

0, 2, 8, 18, 32, 72, 98, 128, 162, 242, 288, 392, 512, 648, 722, 882, 968, 1058, 1152, 1458, 1568, 1922, 2048, 2178, 2592, 2888, 3528, 3698, 3872, 4232, 4418, 4608, 4802, 5832, 6272, 6498, 6962, 7688, 7938, 8192, 8712, 8978, 9522, 10082, 10368, 11552
Offset: 1

Views

Author

Benoit Cloitre, Apr 20 2003

Keywords

Comments

Conjecture: for n>1 this is A050804.
From Altug Alkan, Apr 12 2016: (Start)
Conjecture is true. Proof :
If n = a^2 + b^2, where a and b are nonzero integers, then n^3 = (a^2 + b^2)^3 = A^2 + B^2 = C^2 + D^2 where;
A = 2*a^2*b + (a^2-b^2)*b = 3*a^2*b - b^3,
B = 2*a*b^2 - (a^2-b^2)*a = 3*a*b^2 - a^3,
C = 2*a*b^2 + (a^2-b^2)*a = 1*a*b^2 + a^3,
D = 2*a^2*b - (a^2-b^2)*b = 1*a^2*b + b^3.
Obviously, A, B, C, D are always nonzero because a and b are nonzero integers. Additionally, if a^2 is not equal to b^2, then (A, B) and (C, D) are distinct pairs, that is, n^3 can be expressible as a sum of two nonzero squares more than one way. Since we know that n is a sum of two nonzero squares if and only if n^3 is a sum of two nonzero squares (see comment section of A000404); if n^3 is the sum of two nonzero squares in exactly one way, n must be a^2 + b^2 with a^2 = b^2 and n is the sum of two nonzero squares in exactly one way. That is the definition of this sequence, so this sequence is exactly A050804 except "0" that is the first term of this sequence. (End) [Edited by Altug Alkan, May 14 2016]
Conjecture: sequence consists of numbers of form 2*k^2 such that sigma(2*k^2)==3 (mod 4) and k is not divisible by 5.
The reason of related observation is that 5 is the least prime of the form 4*m+1. However, counterexamples can be produced. For example 57122 = 2*169^2 and sigma(57122) == 3 (mod 4) and it is not divisible by 5. - Altug Alkan, Jun 10 2016
For n > 0, this sequence lists numbers n such that n is the sum of two nonzero squares while n^2 is not. - Altug Alkan, Apr 11 2016
2*k^2 where k has no prime factor == 1 (mod 4). - Robert Israel, Jun 10 2016

Crossrefs

Programs

  • Haskell
    import Data.List (elemIndices)
    a081324 n = a081324_list !! (n-1)
    a081324_list = 0 : elemIndices 1 a063725_list
    -- Reinhard Zumkeller, Aug 17 2011
    
  • Maple
    map(k -> 2*k^2, select(k -> andmap(t -> t[1] mod 4 <> 1, ifactors(k)[2]), [$0..100])); # Robert Israel, Jun 10 2016
  • Mathematica
    Select[ Range[0, 12000], MatchQ[ PowersRepresentations[#, 2, 2], {{n_, n_}}] &] (* Jean-François Alcover, Jun 18 2013 *)
  • PARI
    concat([0,2],apply(n->2*n^2, select(n->vecmin(factor(n)[, 1]%4)>1, vector(100,n,n+1)))) \\ Charles R Greathouse IV, Jun 18 2013

Formula

A063725(a(n)) = 1. [Reinhard Zumkeller, Aug 17 2011]
a(n) = 2*A004144(n-1)^2 for n > 1. - Charles R Greathouse IV, Jun 18 2013

Extensions

a(19)-a(45) from Donovan Johnson, Nov 15 2009
Offset corrected by Reinhard Zumkeller, Aug 17 2011

A121620 Smallest prime of the form k^p - (k-1)^p, where p = prime(n).

Original entry on oeis.org

3, 7, 31, 127, 313968931, 8191, 131071, 524287, 777809294098524691, 68629840493971, 2147483647, 114867606414015793728780533209145917205659365404867510184121, 44487435359130133495783012898708551, 1136791005963704961126617632861
Offset: 1

Views

Author

Alexander Adamchuk, Aug 10 2006

Keywords

Comments

All Mersenne primes of form 2^p-1 = {3, 7, 31, 127, 8191,...} belong to a(n). Mersenne prime A000668(n) = a(k) when prime(k) = A000043(n). Last digit is always 1 for Nexus numbers of form n^p - (n-1)^p with p = {5, 13, 17, 29, 37, 41, 53, 61, 73, 89, 97, 101,...} = A004144(n) Pythagorean primes: primes of form 4n+1.

Crossrefs

Programs

  • Mathematica
    t = {}; n = 0; While[n++; p = Prime[n]; k = 1; While[q = (k + 1)^p - k^p; ! PrimeQ[q], k++]; q < 10^100, AppendTo[t, q]]; t (* T. D. Noe, Feb 12 2013 *)
    spf[p_]:=Module[{k=2},While[CompositeQ[k^p-(k-1)^p],k++];k^p-(k-1)^p]; Table[spf[p],{p,Prime[ Range[20]]}] (* Harvey P. Dale, Apr 01 2024 *)

A000548 Squares that are not the sum of 2 nonzero squares.

Original entry on oeis.org

1, 4, 9, 16, 36, 49, 64, 81, 121, 144, 196, 256, 324, 361, 441, 484, 529, 576, 729, 784, 961, 1024, 1089, 1296, 1444, 1764, 1849, 1936, 2116, 2209, 2304, 2401, 2916, 3136, 3249, 3481, 3844, 3969, 4096, 4356, 4489
Offset: 1

Views

Author

Keywords

Comments

Squares of nonhypotenuse numbers A004144(n). - Lekraj Beedassy, Jul 06 2004
A143574(a(n)) = a(n); intersection of A000290 and A143575. - Reinhard Zumkeller, Aug 24 2008

Programs

  • Mathematica
    okQ[n_] := n == 1 || AllTrue[FactorInteger[n][[All, 1]], Mod[#, 4] != 1& ]; A000548 = Select[Range[100], okQ]^2 (* Jean-François Alcover, Feb 09 2016 *)

Formula

A000290 \ A134422. - R. J. Mathar, Feb 06 2011

A267113 Bitwise-OR of the exponents of all 4k+1 primes in the prime factorization of n.

Original entry on oeis.org

0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 1, 0, 1, 0, 1, 0, 0, 1, 0, 0, 0, 0, 2, 1, 0, 0, 1, 1, 0, 0, 0, 1, 1, 0, 1, 0, 1, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 2, 1, 1, 1, 0, 1, 0, 0, 1, 0, 1, 1, 0, 0, 0, 1, 0, 0, 1, 0, 1, 0, 0, 1, 1, 2, 0, 0, 1, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 1, 1, 0, 0, 0, 1, 0, 1, 0, 0, 2, 1, 1, 0, 1, 1, 1, 0, 0, 1, 1, 1, 0, 1, 0, 1, 1, 1, 0, 1, 1
Offset: 1

Views

Author

Antti Karttunen, Feb 03 2016

Keywords

Examples

			For n = 65 = 5 * 13 = (4+1)^1 * ((3*4)+1)^1, bitwise-or of 1 and 1 is 1, thus a(65) = 1.
		

Crossrefs

Cf. A004144 (indices of zeros), A009003 (of nonzeros).
Differs from both A046080 and A083025 for the first time at n=65, which here a(65) = 1.

Formula

a(n) = A267116(A170818(n)).
Other identities. For all n >= 0:
a(n) = a(A170818(n)). [The result depends only on the prime factors of the form 4k+1.]
a(n) <= A083025(n).

A072438 Remove prime factors of form 4*k+1.

Original entry on oeis.org

1, 2, 3, 4, 1, 6, 7, 8, 9, 2, 11, 12, 1, 14, 3, 16, 1, 18, 19, 4, 21, 22, 23, 24, 1, 2, 27, 28, 1, 6, 31, 32, 33, 2, 7, 36, 1, 38, 3, 8, 1, 42, 43, 44, 9, 46, 47, 48, 49, 2, 3, 4, 1, 54, 11, 56, 57, 2, 59, 12, 1, 62, 63, 64, 1, 66, 67, 4, 69, 14, 71, 72, 1, 2, 3, 76, 77, 6, 79, 16, 81, 2
Offset: 1

Views

Author

Reinhard Zumkeller, Jun 17 2002

Keywords

Comments

a(n) <= n; a(a(n)) = a(n).
All factors p^m of a(n) are of the form p=2 or p=4*k+3.

Examples

			a(90) = a(2*3*3*5) = a(2*(4*0+3)^2*(4*1+1)^1) = 2*3^2*1 = 18.
		

Crossrefs

Programs

  • Maple
    a:= n-> mul(`if`(irem(i[1], 4)=1, 1, i[1]^i[2]), i=ifactors(n)[2]):
    seq(a(n), n=1..100);  # Alois P. Heinz, Jun 09 2014
  • Mathematica
    a[n_] := n/Product[{p, e} = pe; If[Mod[p, 4] == 1, p^e, 1], {pe, FactorInteger[n]}];
    Array[a, 100] (* Jean-François Alcover, May 29 2019 *)
  • PARI
    a(n) = my(f=factor(n)); for (i=1, #f~, if ((f[i,1] % 4) == 1, f[i,1] = 1)); factorback(f); \\ Michel Marcus, Jun 09 2014
    
  • Python
    from sympy import factorint, prod
    def a(n):
        f = factorint(n)
        return 1 if n == 1 else prod(i**f[i] for i in f if i%4 != 1) # Indranil Ghosh, May 08 2017

Formula

Multiplicative with a(p)=(if p==1 (mod 4) then 1 else p).

A164928 Sum of the odd prime divisors of numbers whose odd prime divisors are all of the form 4k+3.

Original entry on oeis.org

3, 3, 7, 3, 11, 3, 7, 3, 19, 10, 11, 23, 3, 3, 7, 31, 14, 3, 19, 10, 43, 11, 23, 47, 3, 7, 3, 7, 22, 59, 31, 10, 14, 67, 26, 71, 3, 19, 18, 79, 3, 83, 10, 43, 11, 23, 34, 47, 3, 7, 14, 103, 107, 3, 7, 22, 59, 11, 31, 10, 127, 46, 131, 14, 26, 67, 26, 139, 50, 71, 3, 10, 151, 19, 18
Offset: 1

Views

Author

Jonathan Vos Post, Aug 31 2009

Keywords

Comments

We define a sequence b(n) = 3, 6, 7, 9, 11, 12, 14, 18, 19, 21, 22, 23, ... to consist of those numbers where all odd prime factors are primes contained in A002145, and which have at least one prime factor in this class; b(n) is basically A004144 without the powers of 2.
a(n) is the sum of the distinct odd prime factors of b(n), where "distinct" means that the multiplicity (exponent) in the prime factorization of b(n) is ignored.
Analogous sequence for primes of form 4k+1 is A164927.
Analogous sequence for primes of form 6k+1 is A164929.
Analogous sequence for primes of form 6k+5 is A164930.

Examples

			a(11) = 10 because b(11) = 21 = 3*7, and 3+7 = 10.
The smallest nonprime number, all of whose prime factors are of form 4n+3, whose sum of distinct prime factors is prime: b(181) = 3*7*19 = 399; 3+7+19 = 29.
		

Crossrefs

Programs

  • Maple
    isb := proc(n) fs := numtheory[factorset](n) minus {2} ; if fs = {} then RETURN(false); else for f in fs do if op(1,f) mod 4 <> 3 then RETURN(false) ; fi; od: RETURN(true) ; fi; end:
    b := proc(n) if n = 1 then 3; else for a from procname(n-1)+1 do if isb(a) then RETURN(a) ; fi; od: fi; end:
    A164928 := proc(n) local f; numtheory[factorset]( b(n)) minus {2} ; add(f,f=%) ; end: seq(A164928(n),n=1..120) ; # R. J. Mathar, Sep 08 2009
  • Mathematica
    sopd[n_]:=Module[{ff=Select[Transpose[FactorInteger[n]][[1]],OddQ]},If[ And@@ (Mod[#,4]==3&/@ff),Total[ff],0]]; Select[Array[sopd,200],#>0&] (* Harvey P. Dale, Dec 16 2013 *)

Extensions

Edited and extended by R. J. Mathar, Sep 08 2009

A230780 Positive numbers without a prime factor congruent to 1 (mod 6).

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 8, 9, 10, 11, 12, 15, 16, 17, 18, 20, 22, 23, 24, 25, 27, 29, 30, 32, 33, 34, 36, 40, 41, 44, 45, 46, 47, 48, 50, 51, 53, 54, 55, 58, 59, 60, 64, 66, 68, 69, 71, 72, 75, 80, 81, 82, 83, 85, 87, 88, 89, 90, 92, 94, 96, 99, 100, 101, 102, 106, 107
Offset: 1

Views

Author

Jean-Christophe Hervé, Nov 23 2013

Keywords

Comments

The sequence is closed under multiplication. Primitive elements are 3 and the primes of form 3*k+2.
a(n)^2 is not expressible as x^2+xy+y^2 with x and y positive integers.
Analog of A004144 (nonhypotenuse numbers) for 120-degree angle triangles: a(n) is not the length of the longest side of such a triangle with integer sides.
It might have been natural to include 0 in this sequence. - M. F. Hasler, Mar 04 2018

Crossrefs

Cf. A002476, A005088, complement of A050931.
Cf. A004144 (analog for 4k+1 primes and right triangles).
Cf. A027748.

Programs

  • Haskell
    a230780 n = a230780_list !! (n-1)
    a230780_list = filter (all (/= 1) . map (flip mod 6) . a027748_row) [1..]
    -- Reinhard Zumkeller, Apr 09 2014
    
  • Mathematica
    Join[{1}, Select[Range[2, 110], ! MemberQ[Union[Mod[Transpose[ FactorInteger[#]][[1]], 6]], 1] &]] (* T. D. Noe, Nov 24 2013 *)
    Join[{1},Select[Range[110],NoneTrue[FactorInteger[#][[All,1]],Mod[#,6] == 1&]&]] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Feb 03 2019 *)
  • PARI
    is_A230780(n)=!setsearch(Set(factor(n)[,1]%6),1) \\ M. F. Hasler, Mar 04 2018

Formula

A005088(a(n)) = 0.

A309778 a(n) is the greatest integer such that, for every positive integer k <= a(n), n^2 can be written as the sum of k positive square integers.

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 1, 1, 1, 2, 1, 1, 155, 1, 211, 1, 275, 1, 1, 2, 1, 1, 1, 1, 611, 662, 1, 1, 827, 886, 1, 1, 1, 1142, 1211, 1, 1355, 1, 1507, 2, 1667, 1, 1, 1, 2011, 1, 1, 1, 1, 2486, 2587, 2690, 2795, 1, 3011, 1, 1, 3350, 1, 3586, 3707, 1, 1, 1
Offset: 1

Views

Author

Bernard Schott, Aug 17 2019

Keywords

Comments

The idea for this sequence comes from the 6th problem of the 2nd day of the 33rd International Mathematical Olympiad in Moscow, 1992 (see link).
There are four cases to examine and three possible values for a(n).
a(n) = 1 iff n is a nonhypotenuse number or iff n is in A004144.
a(n) >= 2 iff n is a hypotenuse number or iff n is in A009003.
a(n) = 2 iff n^2 is the sum of two positive squares but not the sum of three positive squares or iff n^2 is in A309779.
a(n) = n^2 - 14 iff n^2 is the sum of two and three positive squares or iff n^2 is in A231632.
Theorem: a square n^2 is the sum of k positive squares for all 1 <= k <= n^2 - 14 iff n^2 is the sum of 2 and 3 positive squares (proof in Kuczma). Consequently: A231632 = A018820.

Examples

			1 = 1^2, 4 = 2^2 and a(1) = a(2) = 1.
25 = 5^2 = 3^2 + 4^2 and a(5) = 2.
The first representations of 169 are 13^2 = 12^2 + 5^2 = 12^2 + 4^2 + 3^2 = 11^2 + 4^2 + 4^2 + 4^2 =  6^2 + 6^2 + 6^2 + 6^2 + 5^2  = 6^2 + 6^2 + 6^2 + 6^2 + 4^2 + 3^2 = ... and a(13) = 13^2 - 14 = 155.
		

References

  • Marcin E. Kuczma, International Mathematical Olympiads, 1986-1999, The Mathematical Association of America, 2003, pages 76-79.

Crossrefs

A201010 Integers that can be written as the product and/or quotient of Lucas numbers.

Original entry on oeis.org

1, 2, 3, 4, 6, 7, 8, 9, 11, 12, 14, 16, 18, 19, 21, 22, 23, 24, 27, 28, 29, 31, 32, 33, 36, 38, 41, 42, 44, 46, 47, 48, 49, 54, 56, 57, 58, 62, 63, 64, 66, 69, 72, 76, 77, 81, 82, 84, 87, 88, 92, 93, 94, 96, 98, 99, 107, 108, 112, 114, 116, 121, 123, 124, 126, 128
Offset: 1

Views

Author

Arkadiusz Wesolowski, Jan 08 2013

Keywords

Comments

These numbers do not occur in A178777.
The first 20 terms of this sequence are the same as in A004144 (nonhypotenuse numbers).
Integers of the form A200381(n)/A200381(m) for some m and n.

Examples

			19 is in the sequence because Lucas(9)/Lucas(0)^2 = 19.
		

Crossrefs

Cf. A000032, A200381, A200995, A201011. Subsequence of A178772. Complement of A201012.

Programs

  • Mathematica
    maxTerm = 128; Clear[f]; f[lim_] := f[lim] = (luc = LucasL[Range[0, lim]]; luc = Delete[luc, 2];  last = luc[[-1]]; t = {1}; Do[t2 = luc[[n]]^Range[ Floor[ Log[last] / Log[ luc[[n]] ]]]; s = Select[ Union[ Flatten[ Outer[ Times, t, t2]]], # <= last &]; t = Union[t, s], {n, lim}]; maxIndex = Length[A200381 = t]; Reap[ Do[r = A200381[[n]] / A200381[[m]]; If[IntegerQ[r] && r <= maxTerm, Sow[r]], {n, 1, maxIndex}, {m, 1, maxIndex}]][[2, 1]] // Union); f[5]; f[lim = 10]; While[ Print["lim = ", lim]; f[lim] != f[lim-5], lim = lim+5]; f[lim] (* Jean-François Alcover, Jun 24 2015, after script by T. D. Noe in A200381 *)

A244659 Decimal expansion of 4*K/Pi, a constant appearing in the asymptotic evaluation of the number of non-hypotenuse numbers not exceeding a given bound, where K is the Landau-Ramanujan constant.

Original entry on oeis.org

9, 7, 3, 0, 3, 9, 7, 7, 6, 7, 7, 1, 7, 8, 1, 9, 9, 4, 2, 5, 4, 4, 9, 1, 2, 8, 1, 1, 7, 3, 6, 4, 6, 8, 1, 1, 0, 7, 6, 3, 4, 3, 9, 6, 3, 4, 7, 9, 0, 8, 2, 4, 2, 7, 3, 7, 6, 3, 0, 9, 0, 2, 1, 6, 3, 2, 5, 9, 7, 1, 0, 1, 8, 6, 4, 1, 5, 1, 6, 3, 4, 2, 9, 5, 2, 0, 4, 0, 4, 2, 0, 7, 6, 2, 1, 3, 8, 7, 4, 2
Offset: 0

Views

Author

Jean-François Alcover, Jul 04 2014

Keywords

Examples

			0.973039776771781994254491281173646811...
		

References

  • Steven R. Finch, Mathematical Constants, Cambridge University Press, 2003, 2.3 Landau-Ramanujan Constant, p. 101.

Crossrefs

Programs

  • Mathematica
    digits = 100; LandauRamanujan[n_] := With[{K = Ceiling[Log[2, n*Log[3, 10]]]}, N[Product[(((1-2^(-2^k))*4^2^k*Zeta[2^k])/(Zeta[2^k, 1/4] - Zeta[2^k, 3/4]))^2^(-k-1), {k, 1, K}]/Sqrt[2], n]]; K = LandauRamanujan[digits+5]; RealDigits[4*K/Pi, 10, digits] // First (* after Victor Adamchik *)
Previous Showing 31-40 of 43 results. Next