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-10 of 11 results. Next

A064928 Inverse of A034175 considered as a permutation of the nonnegative integers (which it is conjectured to be).

Original entry on oeis.org

0, 1, 11, 2, 7, 8, 3, 12, 40, 13, 4, 9, 24, 25, 10, 5, 14, 41, 19, 42, 15, 6, 35, 26, 31, 32, 27, 36, 47, 16, 43, 20, 102, 21, 44, 17, 48, 37, 28, 33, 58, 57, 34, 29, 38, 49, 18, 45, 22, 103, 79, 104, 23, 46, 75, 50, 39, 30, 63, 116, 59, 60, 115, 64, 55, 70, 51, 74, 109
Offset: 0

Views

Author

Dean Hickerson, Oct 14 2001

Keywords

Crossrefs

Cf. A034175.

Programs

  • Mathematica
    a[0]=b[0]=0; lst={0}; For[n=1, n<250, n++, For[s=Ceiling[Sqrt[a[n-1]]], MemberQ[lst, s^2-a[n-1]], s++, Null]; b[a[n]=s^2-a[n-1]]=n; AppendTo[lst, a[n]]]; Table[b[n], {n, 0, 100}]

A064929 Square of A034175 considered as a permutation of the nonnegative integers (which it is conjectured to be).

Original entry on oeis.org

0, 1, 6, 21, 14, 20, 33, 10, 15, 2, 16, 3, 4, 11, 29, 31, 43, 22, 53, 46, 24, 39, 36, 78, 7, 9, 52, 23, 44, 30, 41, 12, 13, 56, 19, 48, 26, 37, 34, 80, 5, 35, 18, 57, 42, 28, 91, 38, 27, 47, 64, 88, 119, 168, 70, 63, 71, 17, 8, 61, 83, 100, 94, 40, 58, 73, 123, 101, 85, 50
Offset: 0

Views

Author

Dean Hickerson, Oct 14 2001

Keywords

Crossrefs

Cf. A034175.

Programs

  • Mathematica
    a[0]=b[0]=0; lst={0}; For[n=1, n<250, n++, For[s=Ceiling[Sqrt[a[n-1]]], MemberQ[lst, s^2-a[n-1]], s++, Null]; b[a[n]=s^2-a[n-1]]=n; AppendTo[lst, a[n]]]; Table[a[a[n]], {n, 0, 100}]

A064930 Inverse square of A034175 considered as a permutation of the nonnegative integers (which it is conjectured to be).

Original entry on oeis.org

0, 1, 9, 11, 12, 40, 2, 24, 58, 25, 7, 13, 31, 32, 4, 8, 10, 57, 42, 34, 5, 3, 17, 27, 20, 102, 36, 48, 45, 14, 29, 15, 87, 6, 38, 41, 22, 37, 47, 21, 63, 30, 44, 16, 28, 103, 19, 49, 35, 112, 69, 71, 26, 18, 85, 79, 33, 43, 64, 125, 116, 59, 181, 55, 50, 105, 104, 106
Offset: 0

Views

Author

Dean Hickerson, Oct 14 2001

Keywords

Programs

  • Mathematica
    a[0]=b[0]=0; lst={0}; For[n=1, n<250, n++, For[s=Ceiling[Sqrt[a[n-1]]], MemberQ[lst, s^2-a[n-1]], s++, Null]; b[a[n]=s^2-a[n-1]]=n; AppendTo[lst, a[n]]]; Table[b[b[n]], {n, 0, 100}]

A307784 a(n) is the square root of A034175(n) + A034175(n+1).

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 5, 3, 4, 5, 4, 3, 4, 5, 6, 7, 8, 9, 8, 7, 8, 9, 10, 8, 5, 6, 7, 8, 9, 10, 9, 7, 8, 9, 8, 7, 8, 9, 10, 8, 5, 6, 7, 8, 9, 10, 9, 8, 9, 10, 11, 12, 13, 14, 13, 12, 11, 9, 10, 11, 12, 13, 12, 11, 12, 13, 14, 15, 14, 12, 13, 14, 13, 12, 11, 12, 14
Offset: 0

Views

Author

Rémy Sigrist, Apr 28 2019

Keywords

Comments

The sum of two consecutive terms of A034175 is always a perfect square.

Examples

			For n = 12:
- A034175(12) + A034175(13) = 7 + 9 = 16 = 4^2,
- hence a(12) = 4.
		

Crossrefs

Cf. A034175.

Programs

  • PARI
    p=0; s=0; for (n=1, 77, s+=2^p; for (v=0, oo, if (!bittest(s,v) && issquare(p+v), print1 (sqrtint(p+v) ", "); p=v; break)))

Formula

a(n)^2 = A034175(n) + A034175(n+1).

A257218 Lexicographically earliest sequence of distinct positive integers such that gcd(a(n), a(n-1)) takes no value more than twice.

Original entry on oeis.org

1, 2, 3, 6, 4, 8, 10, 5, 15, 9, 18, 12, 16, 24, 30, 20, 40, 32, 48, 36, 27, 54, 72, 60, 45, 75, 25, 50, 70, 7, 14, 28, 42, 21, 63, 126, 84, 56, 112, 64, 96, 120, 80, 100, 150, 90, 108, 81, 162, 216, 144, 168, 140, 35, 105, 210, 180, 135, 225, 300
Offset: 1

Views

Author

Ivan Neretin, Apr 18 2015

Keywords

Comments

Presumably a(n) is a permutation of the positive integers.
Primes seem to occur in their natural order. 31 appears as a(7060). Primes p >= 37 are not found among the first 10000 terms.
Numbers n such that a(n)=n are 1, 2, 3, 12, 306, ...
A256918(n) = gcd(a(n), a(n+1)); gcd(a(A257120(n)), a(A257120(n)+1)) = gcd(a(A257475(n)), a(A257475(n)-1)) = n. - Reinhard Zumkeller, Apr 25 2015
For p prime: A257122(p)-1 = index of the smallest multiple of p: a(A257122(p)-1) mod p = 0 and a(m) mod p > 0 for m < A257122(p)-1. - Reinhard Zumkeller, Apr 26 2015

Examples

			After a(9)=15, the values 1, 2, 3, 4, 6, and 8 are already used, while 7 is forbidden because gcd(15,7)=1 and that value of GCD has already occurred twice, at (1,2) and (2,3). The minimal value which is neither used not forbidden is 9, so a(10)=9.
		

Crossrefs

Other minimal sequences of distinct positive integers that match some condition imposed on a(n) and a(n-1):
A175498 (differences are unique),
A081145 (absolute differences are unique),
A235262 (bitwise XORs are unique),
A163252 (differ by one bit in binary),
A000027 (GCD=1),
A064413 (GCD>1),
A128280 (sum is a prime),
A034175 (sum is a square),
A175428 (sum is a cube),
A077220 (sum is a triangular number),
A073666 (product plus 1 is a prime),
A081943 (product minus 1 is a prime),
A091569 (product plus 1 is a square),
A100208 (sum of squares is a prime).
Cf. A004526.
Cf. A256918, A257120, A257475, A257478, A257122 (putative inverse).
Cf. also A281978.

Programs

  • Haskell
    import Data.List (delete); import Data.List.Ordered (member)
    a257218 n = a257218_list !! (n-1)
    a257218_list = 1 : f 1 [2..] a004526_list where
       f x zs cds = g zs where
         g (y:ys) | cd `member` cds = y : f y (delete y zs) (delete cd cds)
                  | otherwise       = g ys
                  where cd = gcd x y
    -- Reinhard Zumkeller, Apr 24 2015
  • Mathematica
    a={1}; used=Array[0&,10000]; Do[i=1; While[MemberQ[a,i] || used[[l=GCD[a[[-1]],i]]]>=2, i++]; used[[l]]++; AppendTo[a,i], {n,2,100}]; a (* Ivan Neretin, Apr 18 2015 *)

A259260 With a(1) = 1, a(n) is the smallest number not already in the sequence such that the arithmetic mean of two neighboring terms is a square.

Original entry on oeis.org

1, 7, 11, 21, 29, 3, 5, 13, 19, 31, 41, 9, 23, 27, 45, 53, 75, 87, 113, 15, 17, 33, 39, 59, 69, 93, 35, 37, 61, 67, 95, 105, 57, 71, 91, 109, 133, 155, 183, 209, 79, 49, 151, 137, 25, 47, 51, 77, 85, 43, 55, 73, 89, 111, 131, 157, 181, 107, 135, 65, 63, 99, 101, 141, 147, 191, 97, 103, 139, 149, 189, 203, 247, 145
Offset: 1

Views

Author

Derek Orr, Jun 22 2015

Keywords

Comments

Conjectured to be a permutation of the odd numbers.
A259602(n) = (a(n) + a(n+1)) / 2; a(A259526(n)) = 2*n-1. - Reinhard Zumkeller, Jun 29 2015

Crossrefs

Programs

  • Haskell
    import Data.List (delete)
    a259260 n = a259260_list !! (n-1)
    a259260_list = 1 : f 1 [3, 5 ..] where
       f x zs = g zs where
         g (y:ys) = if a010052 ((x + y) `div` 2) == 1
                       then y : f y (delete y zs) else g ys
    -- Reinhard Zumkeller, Jun 29 2015
  • Mathematica
    s={1}; Do[n = Last@ s; a=2; While[(b = 2*a^2 - n) <= 0 || MemberQ[s, b], a++]; AppendTo[s, b], {100}]; s (* Giovanni Resta, Jun 23 2015 *)
  • PARI
    v=[1];n=1;while(#v<100,s=(n+v[#v])/2;if(type(s)=="t_INT",if(issquare(s)&&!vecsearch(vecsort(v),n),v=concat(v,n);n=0));n++);v
    

A076991 a(1) = 1, a(2) = 2, a(n) = smallest positive integer not occurring earlier such that the sum of three successive terms is a square.

Original entry on oeis.org

1, 2, 6, 8, 11, 17, 21, 26, 34, 4, 43, 53, 25, 3, 36, 10, 18, 72, 31, 41, 9, 14, 13, 22, 29, 30, 5, 46, 49, 74, 73, 78, 45, 102, 109, 113, 67, 16, 38, 27, 35, 19, 90, 12, 42, 115, 39, 15, 142, 68, 79, 177, 33, 114, 214, 156, 71, 62, 63, 44, 37, 40, 23, 58, 88, 50, 87, 7, 75
Offset: 1

Views

Author

Amarnath Murthy, Oct 25 2002

Keywords

Crossrefs

Programs

  • Mathematica
    a = {1, 2}; Do[s = a[[-1]] + a[[-2]]; k = Floor[Sqrt[s]] + 1; While[MemberQ[a, k^2 - s], k++]; AppendTo[a, k^2 - s], {n, 3, 70}]; a (* Ivan Neretin, May 25 2015 *)

Extensions

More terms from David Garber, Oct 30 2002

A277616 Lexicographically earliest sequence such that |a(n+1)-a(n)| is a square > 1 (for all n) and no number occurs twice; a(0) = 0.

Original entry on oeis.org

0, 4, 8, 12, 3, 7, 11, 2, 6, 10, 1, 5, 9, 13, 17, 21, 25, 16, 20, 24, 15, 19, 23, 14, 18, 22, 26, 30, 34, 38, 29, 33, 37, 28, 32, 36, 27, 31, 35, 39, 43, 47, 51, 42, 46, 50, 41, 45, 49, 40, 44, 48, 52, 56, 60, 64, 55, 59, 63, 54, 58, 62, 53, 57, 61, 65, 69, 73, 77, 68, 72, 76, 67, 71, 75, 66, 70, 74, 78, 82, 86, 90, 81, 85, 89, 80, 84, 88, 79, 83, 87
Offset: 0

Views

Author

Eric Angelini, Oct 23 2016

Keywords

Comments

A variant is given by A277617, defined in the same way but starting with a(1) = 1. Another variant is A277618, which is defined in a similar way, but with primes instead of squares.
Yet another version is A377091, with an interesting graph. - N. J. A. Sloane, Dec 25 2024
It turns out that the steps a(n+1)-a(n) are either +4 or -9, no other squares occur as distances between successive terms. Indeed, one finds a(13) = 13 and all numbers from 0 to 12 occur as a(n) for 0 <= n <= 12. So there are no "holes", which entails the periodicity. More precisely, a({0, ..., 13k-1}) = {0, ..., 13k-1} and a(13k) = 13k for all k. This also implies that the sequence is a permutation of the nonnegative integers. - M. F. Hasler, Oct 24 2016

Examples

			The possible (absolute) differences between subsequent terms are the squares larger than one, i.e., { 4, 9, 16, ... }.
After 0, the smallest possibility is 0 + 2^2 = 4, the next one is 4 + 2^2 = 8, and then 8 + 2^2 = 12. Now the next term is 12 - 3^2 = 3, thereafter 3 + 2^2 = 7, etc.
In a similar way, 11 is followed by 11 - 3^2, and 10 is followed by 10 - 3^2 = 1.
Thereafter, the next step of -9 will be after 25.
The sequence of steps (first differences) consists of repetitions of the 13 terms (4, 4, 4, -9, 4, 4, -9, 4, 4, -9, 4, 4, 4) which sum to 13.
		

Crossrefs

Programs

  • Maple
    A277616 := proc(n) local L,i,t1; option remember;
    L := [0, 4, 8, 12, 3, 7, 11, 2, 6, 10, 1, 5, 9, 13];
    if n <= 13 then return(L[n+1]) else A277616(n-13)+13; fi; end; # N. J. A. Sloane, Jan 12 2025
  • Mathematica
    LinearRecurrence[{1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, -1}, {0, 4, 8, 12, 3, 7, 11, 2, 6, 10, 1, 5, 9, 13}, 100] (* Paolo Xausa, Jan 16 2025 *)
  • PARI
    {u=[a=0];(chk(n)=(!#u||(n>u[1]&&!setsearch(u,n)))&&(u=setunion(u,[n]))&&!while(#u>1&&u[2]==u[1]+1,u=u[^1]));for(n=1,99,print1(a",");for(k=-sqrtint(a+!a-1),9e9,k^2>1||next;chk(a+k*abs(k))||next;a+=k*abs(k);break))} \\ M. F. Hasler, Oct 23 2016
    
  • PARI
    A277616(n,i=[0,4,8,12,3,7,11,2,6,10,1,5,9])=i[n%#i+1]+n\#i*#i \\ M. F. Hasler, Oct 24 2016

Formula

a(n+13) = a(n)+13 for all n.
From Chai Wah Wu, Mar 30 2023: (Start)
a(n) = a(n-1) + a(n-13) - a(n-14) for n > 13.
G.f.: x*(4*x^12 + 4*x^11 + 4*x^10 - 9*x^9 + 4*x^8 + 4*x^7 - 9*x^6 + 4*x^5 + 4*x^4 - 9*x^3 + 4*x^2 + 4*x + 4)/(x^14 - x^13 - x + 1). (End)

A175428 a(n) is the smallest positive integer such that a(n)+a(n-1) is a cube and a(n) is not in {a(1), ..., a(n-1)}.

Original entry on oeis.org

1, 7, 20, 44, 81, 135, 208, 8, 19, 45, 80, 136, 207, 9, 18, 46, 79, 137, 206, 10, 17, 47, 78, 138, 205, 11, 16, 48, 77, 139, 204, 12, 15, 49, 76, 140, 203, 13, 14, 50, 75, 141, 202, 310, 33, 31, 94, 122, 3, 5, 22, 42, 83, 133, 210, 6, 2, 25, 39, 86, 130, 213, 299, 430, 82
Offset: 1

Views

Author

John W. Layman, May 10 2010

Keywords

Comments

It appears that this is a permutation of the positive integers. 4 occurs as a(149).
See A034175 for the case where a(n)+a(n-1) is a square.
The parity of a(n) equals A133872(n) until n=56 after which there are occasional deviations from the pattern. This is clearly shown by considering the run lengths of the parity for this sequence: 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,3,2,2,2,2,2,2,2,1,2,3,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,3,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,3,2,2,1,2,2,2,1,2,2,3,2,1,2,2,2,3,2,2,2,2,2,2,1,2,2,2,1,2,3,2,2,2,3,2,2,1,2,2,1,... - Jeremy Gardiner, Feb 16 2014

Crossrefs

Cf. A034175, A011934, A000578 (the cubes), A133872.

Programs

  • Mathematica
    a = {1}; For[i = 2, i < 66, i++, k = 1; While[! IntegerQ@ Power[k + a[[i - 1]] && ! MemberQ[a, k], 1/3], k++]; AppendTo[a, k]]; a (* Michael De Vlieger, Jun 02 2015 *)
  • PARI
    v=[1];n=1;while(n<10^3,if(ispower((v[#v]+n),3)&&!vecsearch(vecsort(v),n),v=concat(v,n);n=0);n++);v \\ Derek Orr, Jun 01 2015

A127397 a(0)=0; a(n) = smallest positive integer not occurring earlier in the sequence such that a(n-1)+a(n) = j^k, j = any positive integer, k = any integer >= 2.

Original entry on oeis.org

0, 1, 3, 5, 4, 12, 13, 14, 2, 6, 10, 15, 17, 8, 19, 30, 34, 47, 53, 11, 16, 9, 7, 18, 31, 33, 48, 52, 29, 20, 44, 37, 27, 22, 42, 39, 25, 24, 40, 41, 23, 26, 38, 43, 21, 28, 36, 45, 55, 66, 59, 62, 63, 58, 67, 54, 46, 35, 65, 56, 69, 75, 50, 71, 57, 64, 61, 60, 68, 32, 49, 51, 70
Offset: 0

Views

Author

Leroy Quet, Jan 12 2007

Keywords

Crossrefs

Programs

  • Mathematica
    f[n_] := n == 1 || GCD @@ Last /@ FactorInteger[n] > 1;g[l_List] := Block[{k = 1},While[MemberQ[l, k] || ! f[k + l[[ -1]]], k++ ];Append[l, k]];Nest[g, {0}, 73] (* Ray Chandler, Jan 22 2007 *)

Extensions

Extended by Ray Chandler, Jan 22 2007
Showing 1-10 of 11 results. Next