A154502 and A176209

3 views
Skip to first unread message

Robert Israel

unread,
11:42 AM (5 hours ago) 11:42 AM
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,
12:30 PM (4 hours ago) 12:30 PM
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,
1:12 PM (3 hours ago) 1:12 PM
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,
1:24 PM (3 hours ago) 1:24 PM
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,
1:28 PM (3 hours ago) 1:28 PM
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,
1:40 PM (3 hours ago) 1:40 PM
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,
2:05 PM (3 hours ago) 2:05 PM
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,
2:40 PM (2 hours ago) 2:40 PM
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.

Reply all
Reply to author
Forward
0 new messages