A154502 and A176209

42 views
Skip to first unread message

Robert Israel

unread,
Jan 20, 2026, 11:42:28 AMJan 20
to SeqFan
Two sequences from Vladimir Orlovsky that don't make sense to me:

A154502  Sum of any 3 consecutive numbers is prime and a(n+2)-(a(n+1)+a(n)) is prime, a(1)=3,a(2)=31.

Data:  3, 31, 37, 71, 89, 157, 163

But a(n+2)-(a(n+1)+a(n)) is negative for n = 3, 4 and 5.  
If the intention was to have a(n+2) be the first k such that a(n)+a(n+1)+k and k - (a(n)+a(n+1)) is prime, my calculations show the sequence should go
3,31,37,71,115,193,311,509,837,1353,2201,3567,5781,9353,15137,24501,39641, ...

A176209 Sums of at least 2 squares s', for s >= 4.

Data:  8, 13, 20, 24, 29, 33, 34, 40, 44, 45, 53, 57, 58, 62, 68, 72, 73, 77, 80, 85, 89, 90, 94, 97, 104, 108, 109, 113, 116, 120, 125, 129, 130, 134, 137, 141, 148, 152, 153, 157, 160, 164, 168, 173, 177, 178, 182, 185, 189, 193, 194, 200, 204, 205, 209, 212, 216, 220

From the examples, such as 24=16+4+4, it seems that the squares are not required to be distinct.
So why isn't, say, 17 = 9 + 4 + 4 included?   In fact, it seems to me that every integer > 23 should be included in this sequence. 

Cheers,
Robert

Robin Houston

unread,
Jan 20, 2026, 12:30:40 PMJan 20
to seq...@googlegroups.com
The Mathematica code in the entry for A176209 appears to reproduce the sequence of numbers listed there, in which case the true definition of this sequence is: numbers n that reach zero in two or more steps when repeatedly subtracting the largest square in the range [4, n].

So 24 is included because it reaches zero in three steps: subtract 16, subtract 4, subtract 4.

But 17 is not included because after the first step – subtracting 16 – it is equal to 1, and can be reduced no further.

Whether this sequence is an interesting one is another question…

Robin

--
You received this message because you are subscribed to the Google Groups "SeqFan" group.
To unsubscribe from this group and stop receiving emails from it, send an email to seqfan+un...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/seqfan/eeca0616-471c-434d-9734-92b3df1a6ad3n%40googlegroups.com.

Daniel Mondot

unread,
Jan 20, 2026, 1:12:53 PMJan 20
to seq...@googlegroups.com
Your definition "numbers n that reach zero in two or more steps when repeatedly subtracting the largest square in the range [4, n]."
doesn't explain why 17 is missing.
I think it should be : "numbers k that reach zero in two or more steps when repeatedly subtracting the square of the largest number in the range [2, sqrt(k)]."

Daniel.

Daniel Mondot

unread,
Jan 20, 2026, 1:24:35 PMJan 20
to seq...@googlegroups.com
Never mind. I was wrong. Your new definition is correct. My equivalent definition is what the code is actually doing.

However, I am starting to wonder if in this case, it's not the definition that is incorrect but rather the data.
It is possible that the author incorrectly assumed that if there is a solution, it will always contain the remaining largest square, or that the largest square is always part of at least one path to zero.

Daniel.

Geoffrey Caveney

unread,
Jan 20, 2026, 1:28:26 PMJan 20
to seq...@googlegroups.com
Robin's definition is correct and equivalent to Daniel's alternative phrasing of it. 
Robin also correctly provided 17 as an example of an integer that does not satisfy his definition:
The *largest* square in the range [4, 17] is 16, so it must be subtracted first. 17 - 16 = 1, so no further subtraction is possible because 1 is smaller than 4, so zero cannot be reached.
It is not allowed to subtract 9 from 17 first, because 16 is larger than 9 and less than 17.


On Tue, Jan 20, 2026 at 1:12 PM Daniel Mondot <dmo...@gmail.com> wrote:

Geoffrey Caveney

unread,
Jan 20, 2026, 1:40:33 PMJan 20
to seq...@googlegroups.com
Robert,

Regarding sequence A154502, Orlovsky's definition would match the terms in his sequence, if we make the adjustment that the *absolute value* |a(n+2)-(a(n+1)+a(n))| is prime. 
Then we have 
|89 - (71+37)| = |-19| = 19,
|157 - (89+71)| = |-3| = 3,
|163 - (157+89)| = |-83| = 83,
all of which are prime.


--

Daniel Mondot

unread,
Jan 20, 2026, 2:05:34 PMJan 20
to seq...@googlegroups.com
If we consider the data wrong, instead of the definition, then the data should be:
8, 12, 13, 16, 17, 18, 20, 21, 22, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79

That could be a new sequence. However, it's almost all integers. What would be more interesting would be the numbers that are NOT in the sequence, and that would be just : 0, 1, 2, 3, 4, 5, 6, 7, 9, 10, 11, 14, 15, 19 and 23. 
But that's kind of already in OEIS: it's just 0 and A331802. Incidentally, why is zero not part of A33802 anyway?

Daniel.

Geoffrey Caveney

unread,
Jan 20, 2026, 2:40:35 PMJan 20
to seq...@googlegroups.com
Also, the same change, from the difference to the absolute value of the difference in the definition, could fix sequence A154501. 

The absolute value of the difference is already correctly present in the definition of sequence A154500, which I observe that Robert himself corrected and extended in 2023.

Daniel Mondot

unread,
Jan 20, 2026, 8:23:22 PMJan 20
to seq...@googlegroups.com
Robin, please update A176209 with your definition, so we can finalize the sequence.

Or if someone else has a better definition....

Thanks.

Daniel.

On Tue, Jan 20, 2026 at 12:30 PM Robin Houston <robin....@gmail.com> wrote:

Robert Israel

unread,
Jan 23, 2026, 12:43:52 AMJan 23
to seq...@googlegroups.com
OK, here's another Orlovsky sequence: 
A161665
Primes that can be represented as a sum of 2 and also as a sum of 3 distinct nonzero squares, sharing a term in the sums.
Data:  29, 101, 109, 149, 173, 181, 229, 233, 241, 269, 293, 389, 401, 409, 421, 433, 449, 521, 569, 641, 661, 677, 701, 757, 761, 769, 797, 821, 857, 877, 881, 941, 1021, 1069, 1097, 1109, 1117, 1181, 1229, 1237, 1277, 1289, 1301, 1373, 1381, 1429, 1433, 1481, 1549.

So why not 61 = 5^2 + 6^2 = 3^2 + 4^2 + 6^2, or 89 = 5^2 + 8^2 = 3^2 + 4^2 + 8^2, etc?  According to my computations, the terms up to 1549 should include 61, 89, 281, 349, 461, 509, 541, 601, 613, 653, 709, 773, 809, 829, 929, 953, 1009, 1049, 1061, 1129, 1193, 1201, 1249, 1321, 1361, 1409, 1489.

Cheers,
Robert

Tomasz Ordowski

unread,
Jan 23, 2026, 1:07:20 AMJan 23
to seq...@googlegroups.com
Are these Pythagorean primes p = a^2 + b^2 such that a^2 = x^2 + y^2 ?

Tomasz Ordowski

unread,
Jan 23, 2026, 11:00:51 AMJan 23
to seq...@googlegroups.com
PS. As far as I know, 
it has not yet been proven that there are infinitely many 
Pythagorean primes p = a^2 + b^2 such that a^2 = x^2 + y^2.
Iwaniec's result (regarding a^4 + b^2) is only seemingly stronger.

Robert Israel

unread,
Jan 23, 2026, 11:19:29 AMJan 23
to seq...@googlegroups.com
They are indeed Pythagorean primes p = a^2 + b^2 such that a^2 = x^2 + y^2, with a,b,x,y distinct, but maybe there's some other (unstated) restriction. Or else the Data and Mma code are simply wrong.

Cheers,
Robert

You received this message because you are subscribed to a topic in the Google Groups "SeqFan" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/seqfan/SaNJPZ4l290/unsubscribe.
To unsubscribe from this group and all its topics, send an email to seqfan+un...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/seqfan/CAF0qcNNMfDkicpk0QNDjmvkTkTNWdnBOEernECRug_RodPkDtg%40mail.gmail.com.

Geoffrey Caveney

unread,
Jan 23, 2026, 12:12:52 PMJan 23
to seq...@googlegroups.com
Robert,

Perhaps the intended additional restriction was that the shared term must not be the largest term in the sums.


Tomasz Ordowski

unread,
Jan 23, 2026, 1:56:19 PMJan 23
to seq...@googlegroups.com
Pythagorean primes p = a^2+b^2 such that a^2 = x^2+y^2 
are equivalent to primes of the form p = (k^2+m^2)^2+b^2.


Reply all
Reply to author
Forward
0 new messages